Невозможно установить пакет nloptr в Ubuntu 12.04.5

Я пытаюсь установить nloptr пакет на Ubuntu 12.04.5 с помощью следующей команды:

install.packages("nloptr", dependencies = TRUE)

и получите следующий вывод.

checking for pkg-config... yes
configure: Now testing for NLopt header file.
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking nlopt.h usability... yes
checking nlopt.h presence... yes
checking for nlopt.h... yes
configure: Suitable NLopt library found.
configure: creating ./config.status
config.status: creating src/Makevars

** libs
g++ -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2
-fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c dummy.cpp -o dummy.o gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG    
-I/usr/local/include   -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c nloptr.c -o nloptr.o g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions
-Wl,-z,relro -o nloptr.so dummy.o nloptr.o -L/usr/local/lib -lnlopt -lm -L/usr/lib/R/lib -lR /usr/bin/ld: /usr/local/lib/libnlopt.a(general.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libnlopt.a: could not read symbols: Bad value collect2: ld returned 1 exit status

make: *** [nloptr.so] Error 1
ERROR: compilation failed for package ânloptrâ
* removing â/usr/local/lib/R/site-library/nloptrâ
The downloaded source packages are in
        â/tmp/Rtmpb9JQ3e/downloaded_packages
Warning message: In install.packages("nloptr", dependencies = TRUE) :   installation of package ânloptrâ had non-zero exit status

0 ответов

Другие вопросы по тегам