Whenever I try installing caffe onto my linux mint machine, I keep getting this:
AR -o .build_release/lib/libcaffe.a
LD -o .build_release/lib/libcaffe.so.1.0.0
/usr/bin/ld: cannot find -lhdf5_hl
/usr/bin/ld: cannot find -lhdf5
collect2: error: ld returned 1 exit status
Makefile:572: recipe for target '.build_release/lib/libcaffe.so.1.0.0' failed
make: *** [.build_release/lib/libcaffe.so.1.0.0] Error 1
Do any of you know what I might be doing wrong? Thank you for responding.
If you build caffe using make + Makefile.config, add the location of libhdf5.so (can be retrieved by locate libhdf5.so), for example
/usr/lib/x86_64-linux-gnu/hdf5/serial, to LIBRARY_DIRS variable.
If you use cmake based build, add this path to LD_LIBRARY_PATH and run ldconfig:
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/hdf5/serial:$LD_LIBRARY_PATH
sudo ldconfig
Related
For my thesis work I will have to work with a project that was created with cmake. Therefore, I installed cmake on my PopOS! 21.04 laptop.
cmake --version
cmake version 3.21.3
dpkg doesn't find it though (I had build cmake myself, can I add it to dpkg somehow).
dpkg -l cmake
||/ Name Version Architecture Description
+++-==============-============-============-
===============================>
un cmake <none> <none> (no description
available)`
So I went ahead and downloaded the source code and extracted it on my Desktop. Inside the root source folder I entered:
mkdir build
cd build
sudo cmake ..
sudo cmake --build . --config Release --target install
which works until I get this:
/usr/bin/ld: cannot find -lXrandr /usr/bin/ld: cannot find -lXinerama
/usr/bin/ld: cannot find -lfontconfig /usr/bin/ld: cannot find
-lXrandr /usr/bin/ld: cannot find -lXinerama /usr/bin/ld: cannot find -lfontconfig collect2: error: ld returned 1 exit status gmake[2]: *** [EnvironmentSimulator/Libraries/esminiLib/CMakeFiles/esminiLib.dir/build.make:122:
EnvironmentSimulator/Libraries/esminiLib/libesminiLib.so] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:584:
EnvironmentSimulator/Libraries/esminiLib/CMakeFiles/esminiLib.dir/all]
Error 2 gmake: *** [Makefile:136: all] Error 2
For me it looks like ld cannot find the libraries, if I look if xrandr is in /usr/bin/ it is. I tried linking it with a LD_PATH sth which didnt work and writing to the ld config file.
So now I don't know what else I can try.
I'm trying to upgrade my micronuclues to upload my code to digispark,but when I try to upgrade that happens:
Building command line tool: micronucleus...
gcc -Ilibrary -O -g -D LINUX -o micronucleus micronucleus.c micronucleus_lib.o littleWire_util.o -static -L/usr/lib/x86_64-linux-gnu -lusb
/usr/bin/ld: cannot find -lusb
collect2: error: ld returned 1 exit status
make: *** [Makefile:61: micronucleus] Error 1
I'm a little confused as to how you've gotten it compiling but not linking because, at least on Debian based distributions, the header file that would be needed during compiling is provided by the same package that provides the libusb.a that it is failing to link against.
If you are on a Debian based distro, try (re)installing libusb-dev:
sudo apt install libusb-dev
This is what I've built it against locally.
If you have a libusb.a and it's not in /usr/lib/x86_64-linux-gnu, then you'd need a different directory supplied to -L.
I am trying to compile my game program and it s giving me this
root#vps:/usr/src/Sursa/Server/source/game/src # gmake -j20
linking ../game
ld: error: unable to find library -lmysqlclient
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake: *** [Makefile:228: ../game] Error 1
root#vps:/usr/src/Sursa/Server/source/game/src #
This is my Makefile path for library
# mysql
INCDIR += -I../../../extern/mysql
LIBDIR += -L/usr/local/lib/mysq
LIBS += -lmysqlclient -lz -pthread -lm -lssl -lcrypto
### END
You need to update your GCC compiler since some features of c++14 is not supported by gcc4.9.
You can search the available packages in FreeBSD using
pkg search <package_name>
and install whatever you want via
pkg install <package_name>
Note : you might need sudo before those commands if your current user is not root
Finally if you have problems such as
Fatal error : "some_file"."some_extension" file not found
you can search the package name via the aforementioned command and install them in order to compile successfully.
For example to mitigate the following error
fatal error: 'boost/intrusive_ptr.hpp' file not found
you can install the boost-libs package.
I'm trying to install caffe in Ubuntu 15.04, but get stuck in the make execution. Here is my command and the results. Can anybody help me out?
chauvet#chauvet:~/caffe-master$ make all -j8
LD -o .build_release/lib/libcaffe.so.1.0.0-rc3
/usr/bin/ld: cannot find -lcudart
/usr/bin/ld: cannot find -lcublas
/usr/bin/ld: cannot find -lcurand
/usr/bin/ld: cannot find -lcudnn
collect2: error: ld returned 1 exit status
Makefile:563: recipe for target '.build_release/lib/libcaffe.so.1.0.0-rc3' failed
make: *** [.build_release/lib/libcaffe.so.1.0.0-rc3] Error 1
It seems like cuDNN is not installed in your system.
Try commenting out the line USE_CUDNN := 1 in Makefile.config. Do a make clean and build the project again.
I am trying to compile my c code on linux i386.
I have the sqlite3 library at:
/usr/lib/i386-linux-gnu/libsqlite3.so.0
/usr/lib/i386-linux-gnu/libsqlite3.so.0.8.6
but the linker does not find them. I even specified the path manually with the -L option which I suspect is not necessary:
cc -pthread -L/lib/i386-linux-gnu -L/usr/lib/i386-linux-gnu -L../i386/debug/lib/ ./bin/i386/debug/*.o -lsculib -lpthread -lsqlite3 -o ../i386/debug/bin/myProgram
/usr/bin/ld: cannot find -lsqlite3
collect2: error: ld returned 1 exit status
make: *** [../i386/debug/bin/core] Error 1
any ideas why it does not find them?
Presumably, you also need the header files.
$ sudo apt-get install libsqlite3-dev