[英]error in library.dynam(lib, package, package.lib) shared ovject <library_name>.so not found
Using VirtualBox with Ubuntu 20LTS, and attempting to install and load R packages, getting the error:使用带有 Ubuntu 20LTS 的 VirtualBox,并尝试安装和加载 R 包,得到错误:
error in library.dynam(lib, package, package.lib)
shared object <library_name>.so not found
Where <library_name> can be any of multiply libraries:其中 <library_name> 可以是任何乘法库:
So the error looks like this:所以错误看起来像这样:
error in library.dynam(lib, package, package.lib)
shared object digest.so not found
So far, uninstalled and reinstalled the packages with install.packages() and with sudo apt-get install r-cran-.到目前为止,使用 install.packages() 和 sudo apt-get install r-cran- 卸载并重新安装了软件包。
Currently cannot use devtools to install because it too fails to load with require(devtools)
saying shared object fs.so
(was) not found.目前无法使用 devtools 安装,因为它也无法加载require(devtools)
说 shared object fs.so
(was) not found。
Please help请帮忙
Please step back a second and start from the top with a clean installation of R.请退后一秒,从头开始干净安装 R。 The do该做的
sudo apt-get install r-cran-digest
and library(digest)
will work.和library(digest)
将工作。 I do not recall if fs
and fansi
are available for 20.04 so you will have to come to terms with source installation but even that should be easy of you have r-base-dev
installed.我不记得fs
和fansi
是否可用于 20.04,因此您必须接受源代码安装,但即使安装了r-base-dev
也应该很容易。
Now, we generally strongly recommend you start from the README for Ubuntu at the CRAN repo and enable that repo.现在,我们通常强烈建议您从CRAN 存储库中 Ubuntu 的自述文件开始并启用该存储库。 Then you get R 4.2.1.然后你会得到 R 4.2.1。 If you read the part on '5000+ CRAN Packages' you can equally easily get CRAN binaries for 5000+ packages, including fs
and fansi
as r-cran-*
binaries from the c2d4u.team repo.如果您阅读“5000+ CRAN 包”上的部分,您同样可以轻松地从 c2d4u.team 存储库获取 5000 多个包的 CRAN 二进制文件,包括fs
和fansi
作为r-cran-*
二进制文件。
Better still, I now support a project I call r2u which has all of CRAN for Ubuntu 20.04 and 22.04.更好的是,我现在支持一个我称之为r2u的项目,它包含 Ubuntu 20.04 和 22.04 的所有CRAN。 The installation is simple in five quick steps in a documented script (and detailed at the README of r2u . You then can do安装很简单,只需五个快速步骤,在一个文档化的脚本中(并在r2u 的 README 中有详细说明。然后你可以做
install.packages(c("digest", "fs", "fansi"))
in R and get binaries in seconds as the gif below shows.在 R 中并在几秒钟内获得二进制文件,如下图所示。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.