在Ubuntu 18.04上安装新的R之后安装R依赖项时出错
系统:Ubuntu 18.04 出现的原始错误,提示我尝试重新安装R和依赖项:在Ubuntu 18.04上安装新的R之后安装R依赖项时出错,r,ubuntu,ubuntu-18.04,forecast,R,Ubuntu,Ubuntu 18.04,Forecast,系统:Ubuntu 18.04 出现的原始错误,提示我尝试重新安装R和依赖项: Error: package or namespace load failed for 'lubridate' in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/usr/local/lib/R/site-library/stringi/libs/stringi.so': libicui18n.so.57: cann
Error: package or namespace load failed for 'lubridate' in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/usr/local/lib/R/site-library/stringi/libs/stringi.so': libicui18n.so.57: cannot open shared object file: No such file or directory
/usr/local/lib/R/site-library/BH/include/boost/smart_ptr/scoped_ptr.hpp:74:31: warning: 'template<class> class std::auto_ptr' is deprecated
The downloaded source packages are in
'/tmp/RtmpnulsEe/downloaded_packages'
Warning message:
In install.packages(c("dplyr", "lubridate", "qcc", "forecast", "stringi"), :
installation of package 'forecast' had non-zero exit status
Error: package or namespace load failed for 'forecast' in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/usr/local/lib/R/site-library/curl/libs/curl.so':
/usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by /usr/local/lib/R/site-library/curl/libs/curl.so)
复制步骤:
Error: package or namespace load failed for 'lubridate' in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/usr/local/lib/R/site-library/stringi/libs/stringi.so': libicui18n.so.57: cannot open shared object file: No such file or directory
/usr/local/lib/R/site-library/BH/include/boost/smart_ptr/scoped_ptr.hpp:74:31: warning: 'template<class> class std::auto_ptr' is deprecated
The downloaded source packages are in
'/tmp/RtmpnulsEe/downloaded_packages'
Warning message:
In install.packages(c("dplyr", "lubridate", "qcc", "forecast", "stringi"), :
installation of package 'forecast' had non-zero exit status
Error: package or namespace load failed for 'forecast' in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/usr/local/lib/R/site-library/curl/libs/curl.so':
/usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by /usr/local/lib/R/site-library/curl/libs/curl.so)
apt安装R-base
install.packages(c(“dplyr”、“lubridate”、“qcc”、“forecast”)、repos=http://cran.us.r-project.org)
Error: package or namespace load failed for 'lubridate' in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/usr/local/lib/R/site-library/stringi/libs/stringi.so': libicui18n.so.57: cannot open shared object file: No such file or directory
/usr/local/lib/R/site-library/BH/include/boost/smart_ptr/scoped_ptr.hpp:74:31: warning: 'template<class> class std::auto_ptr' is deprecated
The downloaded source packages are in
'/tmp/RtmpnulsEe/downloaded_packages'
Warning message:
In install.packages(c("dplyr", "lubridate", "qcc", "forecast", "stringi"), :
installation of package 'forecast' had non-zero exit status
Error: package or namespace load failed for 'forecast' in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/usr/local/lib/R/site-library/curl/libs/curl.so':
/usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by /usr/local/lib/R/site-library/curl/libs/curl.so)
清除并重新安装r-base
和r依赖项后,我看到了这个…(已检查libcurl4 openssl dev
是最新版本):
Error: package or namespace load failed for 'lubridate' in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/usr/local/lib/R/site-library/stringi/libs/stringi.so': libicui18n.so.57: cannot open shared object file: No such file or directory
/usr/local/lib/R/site-library/BH/include/boost/smart_ptr/scoped_ptr.hpp:74:31: warning: 'template<class> class std::auto_ptr' is deprecated
The downloaded source packages are in
'/tmp/RtmpnulsEe/downloaded_packages'
Warning message:
In install.packages(c("dplyr", "lubridate", "qcc", "forecast", "stringi"), :
installation of package 'forecast' had non-zero exit status
Error: package or namespace load failed for 'forecast' in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/usr/local/lib/R/site-library/curl/libs/curl.so':
/usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by /usr/local/lib/R/site-library/curl/libs/curl.so)
更新:显然这是forecast
库中的内容,因为我复制了如下错误:
$ R
> library(forecast)
Error: package or namespace load failed for 'forecast' in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/usr/local/lib/R/site-library/curl/libs/curl.so':
/usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by /usr/local/lib/R/site-library/curl/libs/curl.so)
您最初的问题是
stringi
是针对libicu
的发行包版本构建的,该版本已更改。由于此分发包不知道您在/usr/local中有lubridate
,因此它会更改和中断内容
有很多方法可以解决这个问题。最简单(也是最狭窄)的方法是确保安装了libicu-dev
。然后可以重新安装(即:重建stringi
),然后加载lubridate
剩下的你只是有点疯狂,把所有可以移动的东西都扔到墙上。您需要花点时间来认识到,您可以将所有这些作为二进制文件安装(即从launchpad的Michael Rutter PPAs安装),也可以从源代码安装。你的电话。我有一个更老的答案解释了差异(以及在这里的其他后续文章中),我们也在r-sig-debian
列表中提供了帮助
但简而言之:阅读此(ESP前几段),并考虑PPAS。
< P> <强>尝试以下(每一步之间的清除和重新安装R):< /强>Error: package or namespace load failed for 'lubridate' in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/usr/local/lib/R/site-library/stringi/libs/stringi.so': libicui18n.so.57: cannot open shared object file: No such file or directory
/usr/local/lib/R/site-library/BH/include/boost/smart_ptr/scoped_ptr.hpp:74:31: warning: 'template<class> class std::auto_ptr' is deprecated
The downloaded source packages are in
'/tmp/RtmpnulsEe/downloaded_packages'
Warning message:
In install.packages(c("dplyr", "lubridate", "qcc", "forecast", "stringi"), :
installation of package 'forecast' had non-zero exit status
Error: package or namespace load failed for 'forecast' in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/usr/local/lib/R/site-library/curl/libs/curl.so':
/usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by /usr/local/lib/R/site-library/curl/libs/curl.so)
apt吹扫r-base
未找到发布
'CURL\u OPENSSL\u 3'未找到
)'CURL\u OPENSSL\u 3'未找到
)> remove.packages("curl")
> install.packages("curl")
> install.packages(c("dplyr", "lubridate", "qcc", "forecast", "stringi", "curl"), repos='http://cran.us.r-project.org')
一切都如期进行。我最近经常遇到这个问题。。。对于大多数软件包,安装
devtools
,然后从github进行安装,例如devtools::install\u github(“tidyverse/lubridate”)
是可行的。这是一个循环参数。OP说“帮助我,我无法从源代码安装”,而您说“在这里从源代码安装”。不能帮助他克服构建依赖。有趣的是。。。这就是我最初安装R(通过PPAs)的方式,它不工作,因此尝试通过发行版安装。让我在另一次清除后再试一次,看看是否能让它正常工作。现在我想起了为什么不能使用PPA:get:10http://security.ubuntu.com/ubuntu 仿生安全性在Release[83.2 kB]错误:11https://cran.rstudio.com/bin/linux/ubuntu 未找到bionic/Release 404[IP:52.84.243.137 443]正在阅读软件包列表。。。完成E:存储库的https://cran.rstudio.com/bin/linux/ubuntu “仿生/发布”没有发布文件。N:无法安全地从这样的存储库进行更新,因此默认情况下禁用。N:有关存储库创建和用户配置的详细信息,请参阅apt secure(8)手册页。
除了Michael Rutter PPA(sudo add apt repository PPA:marutter/rrutter
),我似乎找不到支持仿生的CRAN mirror/PPA,但我在尝试安装R或库时仍然会遇到错误…有两个:一个用于R3.5本身(),另一个用于包()。更多信息,请参见Michael的博客()。最后一步可以将二进制代码用于r-cran-dplyr
,r-cran-lubridate
。。。