Error: /usr/bin/ld: cannot find -lpython2.7 collect2: error: ld returned 1 exit status - gnu-make

I'm trying build using make command, But I'm getting following error
/usr/bin/ld: cannot find -lpython2.7
collect2: error: ld returned 1 exit status
Its saying cannot find -lpython2.7, but I have python2.7 installed. I have googled it around but didn't find proper solution. Need help to to fix this issue.

Related

How do I install rJava properly on MX Linux

I am trying to install rJava, as it's a dependency of OpenStreetMap (I want to create some maps).
However, when trying to install, I get the following error:
/usr/bin/ld: cannot find -lpcre2-8
collect2: error: ld returned 1 exit status
make[2]: Leaving directory '/tmp/RtmplfpzAZ/R.INSTALL2958202af052/rJava/jri/src'
make[2]: *** [Makefile.all:35: libjri.so] Error 1
make[1]: Leaving directory '/tmp/RtmplfpzAZ/R.INSTALL2958202af052/rJava/jri'
make[1]: *** [Makefile.all:19: src/JRI.jar] Error 2
make: *** [Makevars:14: jri] Error 2
ERROR: compilation failed for package ‘rJava’
* removing ‘/home/maanan/R/x86_64-pc-linux-gnu-library/4.0/rJava’
Warning in install.packages :
installation of package ‘rJava’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpRkgFko/downloaded_packages’
Could someone please tell me what I did wrong? I have JDK and JRE installed.
Thanks.
apt install libpcre2-8-0 libpcre2-dev
That will (should) get you past the error at the very top. Of course I don't know what else you might be missing. Please google future errors you may get ...

Package fracdiff of R fails to install in Linux Mint

I am installing the package forecast. However, I get a persistent error because the package fracdiff fails with this error:
/usr/bin/ld: cannot find -lblas
collect2: error: ld returned 1 exit status
/usr/share/R/share/make/shlib.mk:6: recipe for target 'fracdiff.so' failed
make: *** [fracdiff.so] Error 1
ERROR: compilation failed for package ‘fracdiff’
* removing ‘/home/mario/R/x86_64-pc-linux-gnu-library/3.4/fracdiff’
Warning in install.packages :
installation of package ‘fracdiff’ had non-zero exit status
Normally, when I see had non-zero exit status, it is for me a clue telling me that I should go to Synaptic and search for the library r-cran-fracdiff. However, this library is not present in my repositories, and don't really know how to solve this issue.
Any idea?
"/usr/bin/ld: cannot find -lXXX" tells you that you should be looking for a library named something like "libXXX-dev".
In this case I would install libblas-dev and perhaps also liblapack-dev, as explained here.

Compilation fails when trying to install "pcalg" for R on El Capitan

When trying to install the pcalg package, I am getting the following error:
ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [pcalg.so] Error 1
ERROR: compilation failed for package ‘pcalg’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/pcalg’
The downloaded source packages are in
‘/private/var/folders/54/nwpr9hkn49b1m4h3hjmwph6r0000gn/T/RtmpREqD5T/downloaded_packages’
Warning message:
In install.packages("pcalg") :
installation of package ‘pcalg’ had non-zero exit status
I'm assuming this is because the gfortan package now in gcc, but I don't know how to point it to the right place. Does anybody know how to fix this?

Forecast package not installing R Studio Mac

I'm trying to download the 'forecast' package in my R-Studio and I keep getting the following error. Can someone please explains to me what all this means?
The first warning I get is :-
updateTBATSMatrices.cpp:38:10: warning: unused variable 'gammaVector' [-Wunused-variable]
double *gammaVector;
^
1 warning generated.
The second warning I get is :-
ld: warning: directory not found for option '-L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [forecast.so] Error 1
ERROR: compilation failed for package 'forecast'

r-error:installation of package ‘irlba’ had non-zero exit status

I started using R and when used the following code ,I got the error stating Error in library("recommenderlab") :
there is no package called ‘recommenderlab’
Execution halted
and when i tried to install using install.packages("recommenderlab")
I got
/usr/bin/ld: cannot find -llapack
/usr/bin/ld: cannot find -lblas
/usr/bin/ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status
/usr/share/R/share/make/shlib.mk:6: recipe for target 'irlba.so' failed
make: *** [irlba.so] Error 1
ERROR: compilation failed for package ‘irlba’
* removing ‘/home/senbagaraman/R/x86_64-pc-linux-gnu-library/3.3/irlba’
ERROR: dependency ‘irlba’ is not available for package ‘recommenderlab’
* removing ‘/home/senbagaraman/R/x86_64-pc-linux-gnu-library/3.3/recommenderlab’
The downloaded source packages are in
‘/tmp/Rtmp82yJWk/downloaded_packages’
Warning messages:
1: In install.packages("recommenderlab") :
installation of package ‘irlba’ had non-zero exit status
2: In install.packages("recommenderlab") :
installation of package ‘recommenderlab’ had non-zero exit status
I'm using ubuntu 14.04 and I had just this error:
/usr/bin/ld: cannot find -lgfortran
I searched a little, and find out that the gfortran version and g++ version had to be the same.
lgfortran not found
So I downgrade the g++ version to the gfortran version using the steps available in the link above.
https://askubuntu.com/questions/26498/choose-gcc-and-g-version
Hope this works for you too.

Resources