r-安装包RMySQL/Uubuntu 18.04的问题



R版本3.6.3(2020-02-29(平台:x86_64-pc-linux-gnu(64位(运行于:Ubuntu 18.04.4 LTS

当我尝试使用以下命令安装包RMySQL时:

install.packages('RMySQL')

我收到以下错误消息:

/usr/bin/ld: cannot find -lssl
/usr/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
/usr/share/R/share/make/shlib.mk:6: recipe for target 'RMySQL.so' failed
make: *** [RMySQL.so] Error 1
ERROR: compilation failed for package ‘RMySQL’
* removing ‘/home/lepina/R/x86_64-pc-linux-gnu-library/3.6/RMySQL’
Warning in install.packages :
installation of package ‘RMySQL’ had non-zero exit status

我请求帮助,因为我不知道还能做什么。我已经执行了从4.0.0到3.6.3的R降级,但没有成功。


根据Dirk Eddelbuettel的建议,我运行以下命令行:sudo apt-get install r-cran-rmysql但我收到另一条错误消息:

:~$ sudo apt-get install r-cran-rmysql
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
r-cran-rmysql : Depends: r-api-3.4
Depends: r-cran-dbi (>= 0.4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

因此,我决定使用以下命令修复损坏的包:

sudo apt update --fix-missing
sudo apt install -f

并强制手动安装丢失的包r-api-3.4,使用命令:

sudo apt-get install -y r-api-3.4

但我收到了另一条错误消息,我不知道如何解决它:

Reading package lists... Done
Building dependency tree      
Reading state information... Done
Package r-api-3.4 is a virtual package provided by:
r-base-core 3.4.4-1ubuntu1 [Not candidate version]
E: Package 'r-api-3.4' has no installation candidate

为了让它对其他人可见:Dirk通过终端的解决方案对我有效(Ubuntu 22.04(:sudo apt-get install r-cran-rmysql

相关内容

  • 没有找到相关文章

最新更新