在Ubuntu上,"devtools"软件包的安装退出状态为非零 [英] installation of package ‘devtools’ had non-zero exit status on Ubuntu

查看:79
本文介绍了在Ubuntu上,"devtools"软件包的安装退出状态为非零的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在R版本3.1.1的PowerPC中安装devtools,但是由于curl库而最终失败了:

I'm trying to install devtools in a PowerPC with a R version 3.1.1 but failed at the end because the curl library:

...
** testing if installed package can be loaded Error in dyn.load(file, DLLpath = DLLpath, ...) :    unable to load shared object '/path
to/R/powerpc-unknown-linux-gnu-library/3.1/curl/libs/curl.so':   /path
to/R/powerpc-unknown-linux-gnu-library/3.1/curl/libs/curl.so:
undefined symbol: BSWAP_32 Error: loading failed Execution halted
ERROR: loading failed
 * removing ‘/path to/R/powerpc-unknown-linux-gnu-library/3.1/curl’ ERROR: dependency ‘curl’ is not available for package ‘httr’
 * removing ‘/path to/R/powerpc-unknown-linux-gnu-library/3.1/httr’ ERROR: dependency ‘curl’ is not available for package ‘rversions’
 * removing ‘/path to/R/powerpc-unknown-linux-gnu-library/3.1/rversions’ ERROR:
dependencies ‘httr’, ‘rversions’ are not available for package
‘devtools’
* removing ‘/path to/R/powerpc-unknown-linux-gnu-library/3.1/devtools’

The downloaded source packages are in
 ‘/tmp/RtmpD0yE63/downloaded_packages’ Warning messages: 1: In
install.packages("devtools") :   installation of package ‘curl’ had
non-zero exit status 2: In install.packages("devtools") :  
installation of package ‘httr’ had non-zero exit status 3: In
install.packages("devtools") :   installation of package ‘rversions’
had non-zero exit status 4: In install.packages("devtools") :  
installation of package ‘devtools’ had non-zero exit status

我已经安装了libcurl4-gnutls-dev和libcurl4-openssl-dev,而libcurl版本是7.38.0.

I've already installed libcurl4-gnutls-dev and libcurl4-openssl-dev and the libcurl version is 7.38.0.

有人知道这个解决方法吗?谢谢;)

Does anyone know a fix to this? Thanks ;)

推荐答案

当我尝试在具有Ubuntu 16.04系统的新计算机上安装"devtools"软件包时,我遇到了同样的问题.

The same problem happened to me when I was trying to install "devtools" package on a new machine with Ubuntu 16.04 system.

我尝试了许多答案,包括上面采用的答案,但是直到发现另一个警告信息(因为'lib'未指定)",我仍然无法解决问题.然后我意识到我是由root用户安装R base时以普通用户身份运行R的.这意味着无法将软件包"devtools"安装到默认的R库文件夹中,并且可能无法使用某些从属软件包.然后解决方案变得非常简单:以root用户身份运行R,然后安装"devtools".

I tried many answers including the adopted one above, but I still couldn't solve the problem until I noticed another warning information "(as ‘lib’ is unspecified)". Then I realized that I was running R as a normal user while the R base is installed by root. It means the package "devtools" couldn't be installed into the default R library folder and possibly couldn't use some dependent packages. Then the solution became very easy: run R as root user and then install "devtools".

按照Dean Attali(

Following the instructions of Dean Attali (https://www.digitalocean.com/community/tutorials/how-to-set-up-r-on-ubuntu-14-04), I summarize the steps below. Just run them in a terminal.

$ sudo apt-get -y install libcurl4-gnutls-dev libxml2-dev libssl-dev
$ sudo su  
$ R
> install.packages('devtools', repos='http://cran.rstudio.com/')

就是这样.由于该软件包是由root用户安装的,因此系统的所有用户都可以使用该软件包.

That's it. Since the package is installed by root, it can be used by all users of the system.

这篇关于在Ubuntu上,"devtools"软件包的安装退出状态为非零的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆