當我的Mac升級到10.12.6(塞拉利昂)運行後,R,R,可以不再裝載庫或訪問Internet上任何東西:[R無法升級後加載互聯網例程的MacOS塞拉利昂
> install.packages("devtools")
--- Please select a CRAN mirror for use in this session ---
Warning: failed to download mirrors file (internet routines cannot be loaded); using local file '/anaconda/lib/R/doc/CRAN_mirrors.csv'
[ ...]
Warning: unable to access index for repository
https://cran.cnr.berkeley.edu/src/contrib:
internet routines cannot be loaded
Warning messages:
1: In download.file(url, destfile = f, quiet = TRUE) :
unable to load shared object '/anaconda/lib/R/modules//internet.so':
dlopen(/anaconda/lib/R/modules//internet.so, 6): Library not loaded: @rpath/libssh2.1.dylib
Referenced from: /anaconda/lib/R/modules//internet.so
Reason: image not found
2: package ‘devtools’ is not available (for R version 3.4.1)
同理:
> source("https://bioconductor.org/biocLite.R")
Error in file(filename, "r", encoding = encoding) :
internet routines cannot be loaded
In addition: Warning message:
In file(filename, "r", encoding = encoding) :
unable to load shared object '/anaconda/lib/R/modules//internet.so':
dlopen(/anaconda/lib/R/modules//internet.so, 6): Library not loaded: @rpath/libssh2.1.dylib
Referenced from: /anaconda/lib/R/modules//internet.so
Reason: image not found
發生這種情況既當我從終端運行R和當我運行從RS [R tudio(雖然RStudio只給我錯誤,不是警告,然後仍然失敗)。
我發現過去有其他類似問題的人;一個常見的解決方案是重新安裝XQuartz,這是我所做的,但沒有幫助。
另一個常見的解決方案是更新LD_LIBRARY_PATH。但是,'libssh2.1.dylib'似乎並不存在:'locate libssh2.1.dylib'不會返回任何內容。我確實在/Applications/Xcode.app/Contents/Developer/usr/lib/libssh2.dylib中找到了libssh2.dylib,這大概是同樣的事情,但我認爲R沒有找到它。
任何想法?謝謝!
感謝您的支持!這指出我在Anaconda是罪魁禍首,並且最終我發現我的原始R(在/ usr/local/bin/R中)按照它應該的方式工作。 該問題在Anaconda 4.4.0中持續存在;希望他們能儘快解決它。 – Lucian