我在安装几个软件包时遇到了真正的麻烦,但根本原因主要是缺少库。我将在这里举一个例子。
在 R-2.15.2 内
install.packages("RCurl")
/usr/share/R/include/Rinternals.h:676: note: expected 'const char *' but argument is of type 'ucs_t *'
gcc -std=gnu99 -shared -o RCurl.so base64.o curl.o curlInit.o curl_base64.o enums.o json.o memoryManagement.o myUTF8.o -L/jgi/local/Linux_x86_64/unixadm/curl/7.19.7/lib -lcurl -lidn -lssl -lcrypto -lrt -lssl -lcrypto -lz -lxml2 -L/usr/lib64/R/lib -lR
/usr/bin/ld: cannot find -lidn
collect2: ld returned 1 exit status
make: *** [RCurl.so] Error 1
ERROR: compilation failed for package 'RCurl'
* removing '/house/homedirs/a/apratap/lib/R/RCurl'
我尝试了几件事来提供库路径,但没有成功。
还:
</scratch>echo $LD_LIBRARY_PATH
/usr/lib:/house/homedirs/a/apratap/lib:/jgi/tools/lib
</scratch>echo $R_LD_LIBRARY_PATH
/usr/lib:/house/homedirs/a/apratap/lib:/jgi/tools/lib