gpt4 book ai didi

ubuntu - Caffe 编译错误 - 虚拟框中的 Ubuntu 18.04.4 Live Server

转载 作者:行者123 更新时间:2023-12-04 19:09:19 24 4
gpt4 key购买 nike

这个错误是什么意思,在 caffe 期间编译?我该如何解决?

命令:

cd /home/aegono/CTPN/caffe
sudo make

输出:
LD -o .build_release/lib/libcaffe.so
/usr/bin/ld: cannot find -lgflahs
/usr/bin/ld: cannot find -lhdf5_serial_h1
collect2: error: ld returned 1 exit status
Makefile:515: recipe for target '.build_release/lib/libcaffe.so' failed
make: *** [.build_release/lib/libcaffe.so] Error 1/CTPN/caffe

更新 :

我已经安装了这些模块,但我不知道如何链接它们以及应该链接哪些文件以及在哪里可以找到它们。我没有运气尝试了下面的命令。我在做正确的事吗?
sudo ln -s /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.100.0.0 /usr/lib/x86_64-linux-gnu/hdf5_serial_h1

更新:
/home/aegono/CTPN/caffe是我的 caffe 包的位置。
/usr/lib/x86_64-linux-gnu/当我寻找 gflahs 这个词时,我找不到任何东西,但是当我寻找 gflags 这个词时使用命令 ls -l | grep 'gflags' ,以下是结果:
root@ubuntu_18-04-4_live_server:/usr/lib/x86_64-linux-gnu# ls -l | grep "gflags"
-rw-r--r-- 1 root root 258068 Aug 6 2017 libgflags.a
-rw-r--r-- 1 root root 256002 Aug 6 2017 libgflags_nothreads.a
lrwxrwxrwx 1 root root 26 Aug 6 2017 libgflags_nothreads.so ->
libgflags_nothreads.so.2.2
lrwxrwxrwx 1 root root 28 Aug 6 2017 libgflags_nothreads.so.2.2 ->
libgflags_nothreads.so.2.2.1
-rw-r--r-- 1 root root 146096 Aug 6 2017 libgflags_nothreads.so.2.2.1
lrwxrwxrwx 1 root root 16 Aug 6 2017 libgflags.so ->
libgflags.so.2.2
lrwxrwxrwx 1 root root 18 Aug 6 2017 libgflags.so.2.2 ->
libgflags.so.2.2.1
-rw-r--r-- 1 root root 150248 Aug 6 2017 libgflags.so.2.2.1

当我寻找 hdf5使用命令 ls -l | grep 'hdf5_serial' ,结果如下:
root@ubuntu_18-04-4_live_server:/usr/lib/x86_64-linux-gnu# ls -l | grep "hdf5_serial"
lrwxrwxrwx 1 root root 54 Mar 24 06:01 hdf5_serial_h1 -> /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.100.0.0
lrwxrwxrwx 1 root root 54 Mar 24 06:22 hdf5_serial_h1.so -> /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.100.0.0
lrwxrwxrwx 1 root root 54 Mar 23 19:22 lhdf5_serial_h1 -> /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.100.0.0
-rw-r--r-- 1 root root 8028880 Aug 13 2017 libhdf5_serial.a
-rw-r--r-- 1 root root 398412 Aug 13 2017 libhdf5_serial_fortran.a
lrwxrwxrwx 1 root root 33 Aug 13 2017 libhdf5_serial_fortran.so -> libhdf5_serial_fortran.so.100.0.1
lrwxrwxrwx 1 root root 33 Aug 13 2017 libhdf5_serial_fortran.so.100 -> libhdf5_serial_fortran.so.100.0.1
-rw-r--r-- 1 root root 250760 Aug 13 2017 libhdf5_serial_fortran.so.100.0.1
-rw-r--r-- 1 root root 245840 Aug 13 2017 libhdf5_serial_hl.a
-rw-r--r-- 1 root root 187354 Aug 13 2017 libhdf5_serialhl_fortran.a
lrwxrwxrwx 1 root root 35 Aug 13 2017 libhdf5_serialhl_fortran.so -> libhdf5_serialhl_fortran.so.100.0.0
lrwxrwxrwx 1 root root 35 Aug 13 2017 libhdf5_serialhl_fortran.so.100 -> libhdf5_serialhl_fortran.so.100.0.0
-rw-r--r-- 1 root root 121400 Aug 13 2017 libhdf5_serialhl_fortran.so.100.0.0
lrwxrwxrwx 1 root root 28 Aug 13 2017 libhdf5_serial_hl.so -> libhdf5_serial_hl.so.100.0.0
lrwxrwxrwx 1 root root 28 Aug 13 2017 libhdf5_serial_hl.so.100 -> libhdf5_serial_hl.so.100.0.0
-rw-r--r-- 1 root root 138576 Aug 13 2017 libhdf5_serial_hl.so.100.0.0
-rw-r--r-- 1 root root 4084 Aug 13 2017 libhdf5_serial.settings
lrwxrwxrwx 1 root root 25 Aug 13 2017 libhdf5_serial.so -> libhdf5_serial.so.100.0.1
lrwxrwxrwx 1 root root 25 Aug 13 2017 libhdf5_serial.so.100 -> libhdf5_serial.so.100.0.1
-rw-r--r-- 1 root root 3495976 Aug 13 2017 libhdf5_serial.so.100.0.1
lrwxrwxrwx 1 root root 51 Mar 23 19:17 libhdf5.so -> /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.100.0.1

最佳答案

你不见了hdf5_serialgflags根据编译错误。尝试使用 sudo apt-get install libhdf5-serial-dev 安装它们和 sudo apt-get install libgflags-dev .

如果您已经安装了它们,则需要链接它们。

编辑:
转到Makefile.config .对 PYTHON_INCLUDE 执行以下更改, INCLUDE_DIRS , 和 LIBRARY_DIRS

PYTHON_INCLUDE := /usr/include/python2.7 /usr/local/lib/python2.7/dist-packages/numpy/core/include  
WITH_PYTHON_LAYER := 1
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/hdf5/serial

关于ubuntu - Caffe 编译错误 - 虚拟框中的 Ubuntu 18.04.4 Live Server,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60820454/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com