python - 在 Raspberry Pi 2 上安装 MotionEye 时出现问题

标签 python raspbian raspberry-pi2 pycurl

我安装了所有必需的程序,但是当我尝试安装 MotionEye (sudo pip installmotioneye) 时,出现以下错误:

Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-EI7W87/pycurl

在/home/pi/.pip/pip.log 中存储失败的调试日志

我得到的完整日志:

Collecting motioneye
  Using cached motioneye-0.35.tar.gz
Collecting tornado>=3.1 (from motioneye)
  Using cached tornado-4.4.2.tar.gz
Requirement already satisfied: jinja2 in /usr/lib/python2.7/dist-packages (from motioneye)
Requirement already satisfied: pillow in /usr/lib/python2.7/dist-packages (from motioneye)
Collecting pycurl (from motioneye)
  Using cached pycurl-7.43.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-MEnLpy/pycurl/setup.py", line 823, in <module>
        ext = get_extension(sys.argv, split_extension_source=split_extension_source)
      File "/tmp/pip-build-MEnLpy/pycurl/setup.py", line 497, in get_extension
        ext_config = ExtensionConfiguration(argv)
      File "/tmp/pip-build-MEnLpy/pycurl/setup.py", line 71, in __init__
        self.configure()
      File "/tmp/pip-build-MEnLpy/pycurl/setup.py", line 107, in configure_unix
        raise ConfigurationError(msg)
    __main__.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-MEnLpy/pycurl/

我尝试更新 pip:

sudo pi install -U pip

还有:

 sudo pip install --upgrade setuptools

还有一些我忘记的事情。

我正在运行 Raspbian 8:jessie

不确定这是否有帮助,以下是我在 pi 上运行的其他程序:samba、miniDLNA、no-ip DUC 和 openhab。

我个人认为这是 pycurl 的问题,所以我尝试重新安装它,但没有成功:

 pi@raspberrypi:~ $ sudo pip install pycurl
Collecting pycurl
  Using cached pycurl-7.43.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-4w1sfS/pycurl/setup.py", line 823, in <module>
        ext = get_extension(sys.argv, split_extension_source=split_extension_source)
      File "/tmp/pip-build-4w1sfS/pycurl/setup.py", line 497, in get_extension
        ext_config = ExtensionConfiguration(argv)
      File "/tmp/pip-build-4w1sfS/pycurl/setup.py", line 71, in __init__
        self.configure()
      File "/tmp/pip-build-4w1sfS/pycurl/setup.py", line 107, in configure_unix
        raise ConfigurationError(msg)
    __main__.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-4w1sfS/pycurl/
pi@raspberrypi:~ $ sudo apt-get install python-pycurl
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 minidlna : Depends: libavformat56 (>= 6:11~beta1) but it is not going to be installed
            Depends: libavutil54 (>= 6:11~beta1) but it is not going to be installed
 motion : Depends: libavcodec56 (>= 6:11~beta1) but it is not going to be installed or
                   libavcodec-extra-56 (>= 6:11.7) but it is not going to be installed
          Depends: libavformat56 (>= 6:11~beta1) but it is not going to be installed
          Depends: libavutil54 (>= 6:11~beta1) but it is not going to be installed
          Depends: libmysqlclient18 (>= 5.5.24+dfsg-1) but it is not going to be installed
          Depends: libpq5 but it is not going to be installed
          Depends: libswscale3 (>= 6:11~beta1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

最佳答案

我想我已经解决了! 确实是pycurl的问题。我修复了运行 sudo apt-get install python-pycurl 时遇到的错误 我用以下方法解决了这个问题:

sudo apt-get -f install

之后我可以使用以下命令安装 pycurl:

apt-get install python-pycurl

之后,motioneye 安装就非常有效!

关于python - 在 Raspberry Pi 2 上安装 MotionEye 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40620463/

相关文章:

HTTPS 站点无法在 Squid 透明模式下工作

python - 如何计算列表中的数字

python - Matplotlib 中 x 轴上的时间格式

python - numpy 和 Keras 中 "reshape"函数的差异

c# - 如何从 C# 应用程序向树莓派发送终端命令

raspberry-pi2 - 在 Windows IoT 核心应用程序中访问 usb 棒文件时访问被拒绝错误

python - Pandas 在列上与可选的辅助列合并

linux - Raspbian:从 .sh 文件启动程序

ubuntu - Ubuntu 中的 Raspberry PI 交叉编译 QT GUI 应用程序

hadoop - 树莓派 Hadoop 集群配置