Closed lpj0822 closed 3 years ago
@lpj0822 安装caffe的时候报这个错,是需要安装opencv?
Installing collected packages: wcwidth, ptyprocess, parso, ipython-genutils, traitlets, pygments, prompt-toolkit, pickleshare, pexpect, jedi, cached-property, backcall, python-gflags, protobuf, pandas, leveldb, ipython, h5py, Cython
Successfully installed Cython-0.29.22 backcall-0.2.0 cached-property-1.5.2 h5py-3.1.0 ipython-7.16.1 ipython-genutils-0.2.0 jedi-0.18.0 leveldb-0.201 pandas-1.1.5 parso-0.8.1 pexpect-4.8.0 pickleshare-0.7.5 prompt-toolkit-3.0.17 protobuf-3.15.6 ptyprocess-0.7.0 pygments-2.8.1 python-gflags-3.1.2 traitlets-4.3.3 wcwidth-0.2.5
Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opencv' found
PROTOC src/caffe/proto/caffe.proto
make: protoc: Command not found
Makefile:650: recipe for target '.build_release/src/caffe/proto/caffe.pb.cc' failed
make: *** [.build_release/src/caffe/proto/caffe.pb.cc] Error 127
ERROR: Service 'ai_lib' failed to build: The command '/bin/sh -c echo "\n Begin install caffe..." && cd /opt && curl -o caffe.zip http://118.31.19.101:8080/software/amba/docker_caffe.zip && unzip caffe.zip && cd /opt/caffe/python && pip3 install -i https://mirrors.aliyun.com/pypi/simple -r requirements.txt && cd /opt/caffe && make all && make pycaffe && echo "export PYTHONPATH=/opt/caffe/python:\$PYTHONPATH">>/etc/bash.bashrc && /bin/bash -c "source /etc/bash.bashrc" && rm -rf /opt/caffe.zip && echo "\n Install caffe success"' returned a non-zero code: 2
是的
原先使用的是这个:add-apt-repository --yes ppa:timsc/opencv-3.4
Successfully installed Cython-0.29.22 backcall-0.2.0 cached-property-1.5.2 h5py-3.1.0 ipython-7.16.1 ipython-genutils-0.2.0 jedi-0.18.0 leveldb-0.201 pandas-1.1.5 parso-0.8.1 pexpect-4.8.0 pickleshare-0.7.5 prompt-toolkit-3.0.17 protobuf-3.15.6 ptyprocess-0.7.0 pygments-2.8.1 python-gflags-3.1.2 traitlets-4.3.3 wcwidth-0.2.5
PROTOC src/caffe/proto/caffe.proto
make: protoc: Command not found
make: *** [.build_release/src/caffe/proto/caffe.pb.cc] Error 127
Makefile:650: recipe for target '.build_release/src/caffe/proto/caffe.pb.cc' failed
@lpj0822 这个依赖要按workspace的安装还是直接按master分支的apt-get安装啊
apt-get安装
base镜像中的编码处理影响到了依赖库到安装
After this operation, 3109 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 tzdata all 2021a-0ubuntu0.18.04 [190 kB]
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "C.utf8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
debconf: delaying package configuration, since apt-utils is not installed
Fetched 190 kB in 2s (92.7 kB/s)
Selecting previously unselected package tzdata.
(Reading database ... 69841 files and directories currently installed.)
Preparing to unpack .../tzdata_2021a-0ubuntu0.18.04_all.deb ...
Unpacking tzdata (2021a-0ubuntu0.18.04) ...
Setting up tzdata (2021a-0ubuntu0.18.04) ...
Current default time zone: 'Etc/UTC'
Local time is now: Sun Mar 21 07:19:17 UTC 2021.
Universal Time is now: Sun Mar 21 07:19:17 UTC 2021.
Run 'dpkg-reconfigure tzdata' if you wish to change it.
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package python3-skimagee
Get:44 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-tk amd64 3.6.9-1~18.04 [119 kB]
Get:45 http://archive.ubuntu.com/ubuntu bionic/main amd64 libsnappy-dev amd64 1.1.7-1 [27.2 kB]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/pillow/python3-pil_5.1.0-1ubuntu0.4_amd64.deb 404 Not Found [IP: 91.189.88.142 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Fetched 56.2 MB in 13s (4255 kB/s)
ERROR: Service 'lib' failed to build: The command '/bin/sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata && apt-get install -y libleveldb-dev libsnappy-dev libhdf5-serial-dev liblmdb-dev python3-scipy libopenblas-dev python3-skimage' returned a non-zero code: 100