I'm having some problems installing mclust into R, getting the message found below, any ideas?
install.packages("mclust")
Installing package into ‘/home/aleferna/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL 'http://www.laqee.unal.edu.co/CRAN/src/contrib/mclust_4.2.tar.gz'
Content type 'application/x-gzip' length 1602272 bytes (1.5 Mb)
opened URL
==================================================
downloaded 1.5 Mb
* installing *source* package ‘mclust’ ...
** package ‘mclust’ successfully unpacked and MD5 sums checked
** libs
gfortran -fpic -O3 -pipe -g -c mclust.f -o mclust.o
gcc -std=gnu99 -shared -o mclust.so mclust.o -llapack -lblas -lgfortran -lm -lquadmath -lgfortran -lm -lquadmath -L/usr/lib/R/lib -lR
/usr/bin/ld: cannot find -llapack
/usr/bin/ld: cannot find -lblas
collect2: error: ld returned 1 exit status
make: *** [mclust.so] Error 1
ERROR: compilation failed for package ‘mclust’
* removing ‘/home/aleferna/R/x86_64-pc-linux-gnu-library/3.0/mclust’
The downloaded source packages are in
‘/tmp/RtmpOPyKmZ/downloaded_packages’
Warning message:
In install.packages("mclust") :
installation of package ‘mclust’ had non-zero exit status
/usr/bin/ld: cannot find -llapack
/usr/bin/ld: cannot find -lblas
Means that you need to install such libraries, something like:
$ sudo apt-get install liblapack-dev libblas-dev
Or something like that (depends on your gnu/Linux distribution).
Related
I'm trying to train YOLOv4 with darknet on a computing cluster. But when I make the darknet, it occured that:
/usr/bin/ld: cannot find -lcuda
collect2: error: ld returned 1 exit status
make: *** [darknet] Error 1
This computing cluster can load software with module load. For example, when I need CUDA10.2, just run module load devel/cuda/10.2.
So that means the files of CUDA still locate in the system directory, and I don't have the access to modify any of it.
In this case, how can I fix this problem?
More detail about this error:
[usr#*hpc darknet]$ make
chmod +x *.sh
g++ -std=c++11 -std=c++11 -Iinclude/ -I3rdparty/stb/include -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include obj/image_opencv.o obj/http_stream.o obj/gemm.o obj/utils.o obj/dark_cuda.o obj/convolutional_layer.o obj/list.o obj/image.o obj/activations.o obj/im2col.o obj/col2im.o obj/blas.o obj/crop_layer.o obj/dropout_layer.o obj/maxpool_layer.o obj/softmax_layer.o obj/data.o obj/matrix.o obj/network.o obj/connected_layer.o obj/cost_layer.o obj/parser.o obj/option_list.o obj/darknet.o obj/detection_layer.o obj/captcha.o obj/route_layer.o obj/writing.o obj/box.o obj/nightmare.o obj/normalization_layer.o obj/avgpool_layer.o obj/coco.o obj/dice.o obj/yolo.o obj/detector.o obj/layer.o obj/compare.o obj/classifier.o obj/local_layer.o obj/swag.o obj/shortcut_layer.o obj/activation_layer.o obj/rnn_layer.o obj/gru_layer.o obj/rnn.o obj/rnn_vid.o obj/crnn_layer.o obj/demo.o obj/tag.o obj/cifar.o obj/go.o obj/batchnorm_layer.o obj/art.o obj/region_layer.o obj/reorg_layer.o obj/reorg_old_layer.o obj/super.o obj/voxel.o obj/tree.o obj/yolo_layer.o obj/gaussian_yolo_layer.o obj/upsample_layer.o obj/lstm_layer.o obj/conv_lstm_layer.o obj/scale_channels_layer.o obj/sam_layer.o obj/convolutional_kernels.o obj/activation_kernels.o obj/im2col_kernels.o obj/col2im_kernels.o obj/blas_kernels.o obj/crop_layer_kernels.o obj/dropout_layer_kernels.o obj/maxpool_layer_kernels.o obj/network_kernels.o obj/avgpool_layer_kernels.o -o darknet -lm -pthread `pkg-config --libs opencv4 2> /dev/null || pkg-config --libs opencv` -L/usr/local/cuda/lib64 -lcuda -lcudart -lcublas -lcurand -L/usr/local/cudnn/lib64 -lcudnn -lstdc++
/usr/bin/ld: cannot find -lcuda
collect2: error: ld returned 1 exit status
make: *** [darknet] Error 1
On a machine with a GPU (and driver) installed, the -lcuda dependency can usually be satisfied because the driver installs the libcuda.so (or equivalent on windows) in the link search path (typically).
However on a machine with no GPU installed (e.g. a login node or build machine in a cluster) the driver won't be installed and therefore libcuda.so won't be in the "usual place".
In these situations, "stub" libraries are provided, usually in the /stubs directory off the CUDA toolkit library install directory (e.g. /usr/local/cuda/lib64).
Therefore, if you change your Makefile at this line to read:
LDFLAGS+= -L/usr/local/cuda/lib64 -lcudart -lcublas -lcurand -L/usr/local/cuda/lib64/stubs -lcuda
it should allow that library to be located.
I'm on 64-bit Ubuntu and I'm trying to build with "libasmlibrary.so" with Eclipse. However, it kept telling me that the library is incompatible, either with "-m32" or "-m64". This is what is shown when I don't add either of the two options.
17:25:54 ** Incremental Build of configuration Debug for project ASM_TEST **
make all
Building target: ASM_TEST
Invoking: GCC C++ Linker
g++ -L/usr/local/lib -L/home/leon/asmlibrary/linux -o "ASM_TEST" ./src/demo_fit.o ./src/video_camera.o ./src/vjfacedetect.o -lopencv_core -lasmlibrary -lopencv_highgui -lopencv_imgproc -lopencv_ml -lopencv_video -lopencv_objdetect
/usr/bin/ld: skipping incompatible /home/leon/asmlibrary/linux/libasmlibrary.so when searching for -lasmlibrary
/usr/bin/ld: cannot find -lasmlibrary
collect2: ld returned 1 exit status
make: * [ASM_TEST] Error 1
17:25:54 Build Finished (took 111ms)
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
I have a problem with compiling zabbix-server on CentOS 6.2.
Command line is:
./configure --enable-server --with-mysql --with-net-snmp --with-libcurl
--with-jabber --with-ssh2 --with-openipmi --with-ldap --enable-static
But error occures:
checking for main in -lz... no
configure: error: Not found z library;
Full configure output is here: http://pastebin.ru/WmDP7UL0
I already tried to do:
yum install zlib zlib-devel zlib-static zlibrary zlibrary-devel
But it was unsuccessfully.
Thank you for your attention.
UPD. Config log posted here: http://pastebin.ru/WNtQu9eR and shows this error:
configure:7366: checking for main in -lz
configure:7385: gcc -o conftest -g -O2 -rdynamic -static conftest.c -lz -lm -lrt -lresolv >&5
/usr/bin/ld: cannot find -lm
collect2: ld returned 1 exit status
Here's the actual error:
/usr/bin/ld: cannot find -lm
But it is found previously, which points to something else. Check your ulimits to make sure you don't have a low max open file count.
I'm trying to install kernlab package on R, but I got a whole bunch of error messages, near the end it says:
g++ -shared -L/usr/local/lib64 -o kernlab.so brweight.o ctable.o cweight.o dbreakpt.o dcauchy.o dgpnrm.o dgpstep.o dprecond.o dprsrch.o dspcg.o dtron.o dtrpcg.o dtrqsol.o esa.o expdecayweight.o inductionsort.o kspectrumweight.o lcp.o misc.o msufsort.o solvebqp.o stringk.o stringkernel.o svm.o wkasailcp.o wmsufsort.o -L/usr/lib64/R/lib -lRlapack -L/usr/lib64/R/lib -lRblas -lgfortran -lm -L/usr/lib64/R/lib -lR
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lgfortran
collect2: ld returned 1 exit status
make: * [kernlab.so] Error 1
ERROR: compilation failed for package âkernlabâ
* removing â/usr/lib64/R/library/kernlabâ
The downloaded source packages are in
â/tmp/RtmpzLdUMp/downloaded_packagesâ
Updating HTML index of packages in '.Library'
Making packages.html ... done
Warning message:
In install.packages("kernlab") :
installation of package âkernlabâ had non-zero exit status
I suspect it has something to do gcc-fortran. I'm using SUSE 11 SP1, I have libgfortran43-4.3.4_20091019-47.1 installed, but i wasn't able to figure out how to install gcc-fortran with yast.
Any help is appreciated! Thanks!
I don't use SUSE but a little bit of searching suggests that you can get gcc-fortran from this page: http://software.opensuse.org/package/gcc-fortran