installation of package ‘devtools’ had non-zero exit status in a powerpc

狂风中的少年 提交于 2019-12-04 02:47:32

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

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".

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/')

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

For Curl use:

apt-get -y build-dep libcurl4-gnutls-dev
apt-get -y install libcurl4-gnutls-dev

And you should update the R version to R-3.1.2

wget http://cran.r-project.org/src/base/R-3/R-3.1.2.tar.gz

I m using Ubuntu 16.04 and this is how I solved this issue:

aptitude install libssl-dev

then aptitude packg manage will allow you to choose the right version which is required for installation of devtools. Repeat the same for

aptitude libcurl4-gnutls-dev
aptitude libxml2-dev

Finally, install this libgit2 lib

devtools::install_github('ropensci/git2r')
devtools::load_all()
R CMD INSTALL git2r

I could not solve it with apt-get packg manager. Thats all :) !

Hafiz Shehbaz Ali

This error was happening when I was using 3.0.2. I updated the R, now It is fine. I also spent the one day to find the solution. I tried the all the solution. But, no effect. I updated the R using this solution. Now, devtools package is working.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!