IT박스

“Non Zero Exit Status”R 3.0.1 'XML'및 'RCurl'

itboxs 2020. 11. 14. 10:02
반응형

“Non Zero Exit Status”R 3.0.1 'XML'및 'RCurl'


Ubuntu 머신 13.10에 XML 및 RCurl을 설치하는 데 약간의 문제가 있습니다. 오늘 모든 sudo 업데이트 및 업그레이드를 수행했습니다.

R에 rattle을 사용하려고합니다. rattle 사용에 필요한 'XML'을 설치할 수 없습니다. 이것은 1 년 후 다른 OS에서 바로 여기 에서 물었던 것과 거의 같은 질문입니다 . 다시 표시되는 오류 메시지는 다음과 같습니다.

> install.packages("RCurl")
Installing package into ‘/home/steven/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/RCurl_1.95-4.1.tar.gz'
Content type 'application/x-gzip' length 870915 bytes (850 Kb)
opened URL
==================================================
downloaded 850 Kb

* installing *source* package ‘RCurl’ ...
** package ‘RCurl’ successfully unpacked and MD5 sums checked
checking for curl-config... no
Cannot find curl-config
ERROR: configuration failed for package ‘RCurl’
* removing ‘/home/steven/R/x86_64-pc-linux-gnu-library/3.0/RCurl’
Warning in install.packages :
  installation of package ‘RCurl’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpUwBkbS/downloaded_packages’
> install.packages("XML")
Installing package into ‘/home/steven/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/XML_3.98-1.1.tar.gz'
Content type 'application/x-gzip' length 1582216 bytes (1.5 Mb)
opened URL
==================================================
downloaded 1.5 Mb

* installing *source* package ‘XML’ ...
** package ‘XML’ successfully unpacked and MD5 sums checked
checking for gcc... gcc
checking for C compiler default output file name... 
rm: cannot remove 'a.out.dSYM': Is a directory
a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for sed... /bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking for xml2-config... no
Cannot find xml2-config
ERROR: configuration failed for package ‘XML’
* removing ‘/home/steven/R/x86_64-pc-linux-gnu-library/3.0/XML’
Warning in install.packages :
  installation of package ‘XML’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpUwBkbS/downloaded_packages’

여기에서 진행하는 방법을 잘 모르겠습니다.


Ubuntu에 curl 및 xml을 설치하려면. 운영

sudo apt-get install libcurl4-openssl-dev libxml2-dev

R의 패키지 설치에 대한 오류 메시지는 curl 및 xml 라이브러리가 없거나 찾을 수 없음을 나타냅니다.


CentOS 6+에서는 다음을 사용하여 수행 할 수 있습니다.

sudo yum -y install curl
sudo yum -y install libcurl libcurl-devel
sudo yum -y install libxml2 libxml2-devel

사용하여 설치할 수없는 사람들을 위해 yum또는 apt-get, 나는 나의 경험을 공유 :

I installed libcurl-openssl-dev myself by downloading the source code and compiling. I still ran into the Cannot find curl-config problem though...I didn't know what to do until looking at RCurl source code and seeing a CURL_CONFIG environment variable being referenced. I tried setting this myself in my .bashrc and it seems to have worked:

export CURL_CONFIG=~/my/libcurl/curl-config

참고URL : https://stackoverflow.com/questions/20671814/non-zero-exit-status-r-3-0-1-xml-and-rcurl

반응형