我在安裝幾個包時遇到了麻煩,但根本原因主要是缺少庫。我將在這裏列舉一個例子。從命令行安裝R包
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
保存此頁面右上角的源代碼:http://www.omegahat.org/RCurl/然後從R的軟件包安裝程序中選擇從源代碼安裝並選擇此存檔。 – Maiasaura
@Maiasaura:感謝您的快速回復,但我認爲鏈接已關閉.. [鏈接](http://www.omegahat.org/RCurl/RCurl_1.95-3.tar.gz) – Abhi
嘗試從這裏下載[鏈接](http://www.omegahat.org/R/src/contrib/)..still得到相同的錯誤 – Abhi