【发布时间】:2023-04-02 17:55:01
【问题描述】:
我在运行 Fedora 27 的 RStudio 中安装 xml2 时遇到问题。在运行 install.packages('xml2') 时,我收到以下错误:
installing to /home/ryi/R/x86_64-redhat-linux-gnu-library/3.4/xml2/libs
** R
** inst
** preparing package for lazy loading
** help
Error : /tmp/Rtmp2sKZQZ/R.INSTALL689b37bd918d/xml2/man/read_xml.Rd:47: unable to load shared object '/home/ryi/R/x86_64-redhat-linux-gnu-library/3.4/xml2/libs/xml2.so':
libicui18n.so.58: cannot open shared object file: No such file or directory
ERROR: installing Rd objects failed for package ‘xml2’
* removing ‘/home/ryi/R/x86_64-redhat-linux-gnu-library/3.4/xml2’
Warning in install.packages :
installation of package ‘xml2’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpPs5Gzi/downloaded_packages’
我注意到在我的/usr/lib64/ 中,我只有libicui18n.so.57,所以我尝试在那里复制libicui18n.so.58,但出现以下错误:
installing to /home/ryi/R/x86_64-redhat-linux-gnu-library/3.4/xml2/libs
** R
** inst
** preparing package for lazy loading
** help
Error : /tmp/Rtmp908Ecf/R.INSTALL653812e0e41f/xml2/man/read_xml.Rd:47: unable to load shared object '/home/ryi/R/x86_64-redhat-linux-gnu-library/3.4/xml2/libs/xml2.so':
libicuuc.so.58: cannot open shared object file: No such file or directory
ERROR: installing Rd objects failed for package ‘xml2’
* removing ‘/home/ryi/R/x86_64-redhat-linux-gnu-library/3.4/xml2’
Warning in install.packages :
installation of package ‘xml2’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpPs5Gzi/downloaded_packages’
我注意到了同样的问题——我有这个库的 .57 版本,而不是 .58 版本。在我一遍又一遍地重复之前,这实际上是一个共享库问题吗?或者,有没有办法一次性解决这个问题?
我已经安装了 xml2 (libxml2-devel-2.9.5-2.fc27.x86_64)。
【问题讨论】:
-
可能是权限问题。不要通过 RStudio 安装,而是使用 R.exe 在命令行中使用
sudo运行安装。