从源代码在Ubuntu 14.04(64位)上安装R时,我从make
收到错误。我的安装步骤如下:
sudo apt-get install build-essential sudo apt-get install gfortran sudo apt-get install libreadline6-dev sudo apt-get install libxt-dev ./configure --prefix=/home/li/Dev/R-3.2.0 --enable-R-shlib make
然后我收到以下错误:
collect2: error: ld returned 1 exit status make[3]: *** [R.bin] Error 1 make[3]: Leaving directory `/home/li/Dev/R/src/main' make[2]: *** [R] Error 2 make[2]: Leaving directory `/home/li/Dev/R/src/main' make[1]: *** [R] Error 1 make[1]: Leaving directory `/home/li/Dev/R/src' make: *** [R] Error 1
答案 0 :(得分:0)
@li:~/Dev/R$ make make[1]: Entering directory `/home/li/Dev/R/m4' make[1]: Nothing to be done for `R'. make[1]: Leaving directory `/home/li/Dev/R/m4' make[1]: Entering directory `/home/li/Dev/R/tools' make[1]: Nothing to be done for `R'. make[1]: Leaving directory `/home/li/Dev/R/tools' make[1]: Entering directory `/home/li/Dev/R/doc' make[2]: Entering directory `/home/li/Dev/R/doc/html' make[2]: Leaving directory `/home/li/Dev/R/doc/html' make[2]: Entering directory `/home/li/Dev/R/doc/manual' make[2]: Nothing to be done for `R'. make[2]: Leaving directory `/home/li/Dev/R/doc/manual' make[1]: Leaving directory `/home/li/Dev/R/doc' make[1]: Entering directory `/home/li/Dev/R/etc' make[1]: Leaving directory `/home/li/Dev/R/etc' make[1]: Entering directory `/home/li/Dev/R/share' make[1]: Leaving directory `/home/li/Dev/R/share' make[1]: Entering directory `/home/li/Dev/R/src' make[2]: Entering directory `/home/li/Dev/R/src/scripts' make[3]: Entering directory `/home/li/Dev/R/src/scripts' make[3]: Leaving directory `/home/li/Dev/R/src/scripts' make[2]: Leaving directory `/home/li/Dev/R/src/scripts' make[2]: Entering directory `/home/li/Dev/R/src/include' make[3]: Entering directory `/home/li/Dev/R/src/include/R_ext' make[3]: Nothing to be done for `R'. make[3]: Leaving directory `/home/li/Dev/R/src/include/R_ext' make[2]: Leaving directory `/home/li/Dev/R/src/include' make[2]: Entering directory `/home/li/Dev/R/src/extra' make[3]: Entering directory `/home/li/Dev/R/src/extra/blas' make[4]: Entering directory `/home/li/Dev/R/src/extra/blas' make[4]: `libRblas.so' is up to date. make[4]: Leaving directory `/home/li/Dev/R/src/extra/blas' make[4]: Entering directory `/home/li/Dev/R/src/extra/blas' /home/li/Dev/R/lib/libRblas.so is unchanged make[4]: Leaving directory `/home/li/Dev/R/src/extra/blas' make[3]: Leaving directory `/home/li/Dev/R/src/extra/blas' make[3]: Entering directory `/home/li/Dev/R/src/extra/pcre' make[4]: Entering directory `/home/li/Dev/R/src/extra/pcre' make[4]: `Makedeps' is up to date. make[4]: Leaving directory `/home/li/Dev/R/src/extra/pcre' make[4]: Entering directory `/home/li/Dev/R/src/extra/pcre' make[4]: `libpcre.a' is up to date. make[4]: Leaving directory `/home/li/Dev/R/src/extra/pcre' make[3]: Leaving directory `/home/li/Dev/R/src/extra/pcre' make[3]: Entering directory `/home/li/Dev/R/src/extra/tre' make[4]: Entering directory `/home/li/Dev/R/src/extra/tre' make[4]: `Makedeps' is up to date. make[4]: Leaving directory `/home/li/Dev/R/src/extra/tre' make[4]: Entering directory `/home/li/Dev/R/src/extra/tre' make[4]: `libtre.a' is up to date. make[4]: Leaving directory `/home/li/Dev/R/src/extra/tre' make[3]: Leaving directory `/home/li/Dev/R/src/extra/tre' make[3]: Entering directory `/home/li/Dev/R/src/extra/xz' make[4]: Entering directory `/home/li/Dev/R/src/extra/xz' make[4]: `liblzma.a' is up to date. make[4]: Leaving directory `/home/li/Dev/R/src/extra/xz' make[3]: Leaving directory `/home/li/Dev/R/src/extra/xz' make[2]: Leaving directory `/home/li/Dev/R/src/extra' make[2]: Entering directory `/home/li/Dev/R/src/appl' make[3]: Entering directory `/home/li/Dev/R/src/appl' make[3]: `libappl.a' is up to date. make[3]: Leaving directory `/home/li/Dev/R/src/appl' make[2]: Leaving directory `/home/li/Dev/R/src/appl' make[2]: Entering directory `/home/li/Dev/R/src/nmath' make[3]: Entering directory `/home/li/Dev/R/src/nmath' make[3]: `libnmath.a' is up to date. make[3]: Leaving directory `/home/li/Dev/R/src/nmath' make[2]: Leaving directory `/home/li/Dev/R/src/nmath' make[2]: Entering directory `/home/li/Dev/R/src/unix' make[3]: Entering directory `/home/li/Dev/R/src/unix' make[3]: `libunix.a' is up to date. make[3]: Leaving directory `/home/li/Dev/R/src/unix' make[3]: Entering directory `/home/li/Dev/R/src/unix' gcc -std=gnu99 -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -fopenmp -fpic -g -O2 -L/usr/local/lib -DR_HOME='"/home/li/Dev/R"' \ -o Rscript ./Rscript.c make[3]: Leaving directory `/home/li/Dev/R/src/unix' make[2]: Leaving directory `/home/li/Dev/R/src/unix' make[2]: Entering directory `/home/li/Dev/R/src/main' make[3]: Entering directory `/home/li/Dev/R/src/main' make[4]: Entering directory `/home/li/Dev/R/src/main' /home/li/Dev/R/lib/libR.so is unchanged make[4]: Leaving directory `/home/li/Dev/R/src/main' make[3]: Leaving directory `/home/li/Dev/R/src/main' make[3]: Entering directory `/home/li/Dev/R/src/main' gcc -std=gnu99 -Wl,--export-dynamic -fopenmp -L../../lib -L/usr/local/lib -o R.bin Rmain.o -lR -lRblas ../../lib/libR.so: undefined reference to `BZ2_bzBuffToBuffCompress' ../../lib/libR.so: undefined reference to `BZ2_bzBuffToBuffDecompress' ../../lib/libR.so: undefined reference to `BZ2_bzlibVersion' ../../lib/libR.so: undefined reference to `BZ2_bzDecompressInit' ../../lib/libR.so: undefined reference to `BZ2_bzDecompressEnd' ../../lib/libR.so: undefined reference to `BZ2_bzReadClose' ../../lib/libR.so: undefined reference to `BZ2_bzWriteOpen' ../../lib/libR.so: undefined reference to `BZ2_bzWriteClose' ../../lib/libR.so: undefined reference to `BZ2_bzWrite' ../../lib/libR.so: undefined reference to `BZ2_bzReadGetUnused' ../../lib/libR.so: undefined reference to `BZ2_bzDecompress' ../../lib/libR.so: undefined reference to `BZ2_bzReadOpen' ../../lib/libR.so: undefined reference to `BZ2_bzRead' collect2: error: ld returned 1 exit status make[3]: *** [R.bin] Error 1 make[3]: Leaving directory `/home/li/Dev/R/src/main' make[2]: *** [R] Error 2 make[2]: Leaving directory `/home/li/Dev/R/src/main' make[1]: *** [R] Error 1 make[1]: Leaving directory `/home/li/Dev/R/src' make: *** [R] Error 1
我再做一遍,结果如上! @Warren Young @Alex A