2017-10-15 5 views
0

R을 설치했고 추가 패키지 설치를 시도했습니다 : rgl.Linux에서 R 패키지 설치

> warnings() 
Warning messages: 
1: In install.packages("rgl") : 
installation of package ‘stringi’ had non-zero exit status 
2: In install.packages("rgl") : 
installation of package ‘yaml’ had non-zero exit status 
3: In install.packages("rgl") : 
installation of package ‘digest’ had non-zero exit status 
4: In install.packages("rgl") : 
installation of package ‘httpuv’ had non-zero exit status 
5: In install.packages("rgl") : 
installation of package ‘mime’ had non-zero exit status 
6: In install.packages("rgl") : 
installation of package ‘sourcetools’ had non-zero exit status 
7: In install.packages("rgl") : 
installation of package ‘jsonlite’ had non-zero exit status 
8: In install.packages("rgl") : 
installation of package ‘markdown’ had non-zero exit status 
9: In install.packages("rgl") : 
installation of package ‘stringr’ had non-zero exit status 
10: In install.packages("rgl") : 
installation of package ‘htmltools’ had non-zero exit status 
11: In install.packages("rgl") : 
installation of package ‘evaluate’ had non-zero exit status 
12: In install.packages("rgl") : 
installation of package ‘htmlwidgets’ had non-zero exit status 
13: In install.packages("rgl") : 
installation of package ‘shiny’ had non-zero exit status 
14: In install.packages("rgl") : 
installation of package ‘knitr’ had non-zero exit status 
15: In install.packages("rgl") : 
installation of package ‘rgl’ had non-zero exit status 

그리고 전체 설치 로그 :

> install.packages("rgl") 
Installing package into ‘/usr/local/lib/R/site-library’ 
(as ‘lib’ is unspecified) 
--- Please select a CRAN mirror for use in this session --- 
also installing the dependencies ‘stringi’, ‘yaml’, ‘digest’, ‘evaluate’, ‘markdown’, ‘stringr’, ‘httpuv’, ‘mime’, ‘sourcetools’, ‘htmlwidgets’, ‘htmltools’, ‘knitr’, ‘jsonlite’, ‘shiny’ 

trying URL 'https://cloud.r-project.org/src/contrib/stringi_1.1.5.tar.gz' 
Content type 'application/x-gzip' length 3645872 bytes (3.5 MB) 
================================================== 
downloaded 3.5 MB 

trying URL 'https://cloud.r-project.org/src/contrib/yaml_2.1.14.tar.gz' 
Content type 'application/x-gzip' length 81095 bytes (79 KB) 
================================================== 
downloaded 79 KB 

trying URL 'https://cloud.r-project.org/src/contrib/digest_0.6.12.tar.gz' 
Content type 'application/x-gzip' length 120337 bytes (117 KB) 
================================================== 
downloaded 117 KB 

trying URL 'https://cloud.r-project.org/src/contrib/evaluate_0.10.1.tar.gz' 
Content type 'application/x-gzip' length 22177 bytes (21 KB) 
================================================== 
downloaded 21 KB 

trying URL 'https://cloud.r-project.org/src/contrib/markdown_0.8.tar.gz' 
Content type 'application/x-gzip' length 80583 bytes (78 KB) 
================================================== 
downloaded 78 KB 

trying URL 'https://cloud.r-project.org/src/contrib/stringr_1.2.0.tar.gz' 
Content type 'application/x-gzip' length 94095 bytes (91 KB) 
================================================== 
downloaded 91 KB 

trying URL 'https://cloud.r-project.org/src/contrib/httpuv_1.3.5.tar.gz' 
Content type 'application/x-gzip' length 427638 bytes (417 KB) 
================================================== 
downloaded 417 KB 

trying URL 'https://cloud.r-project.org/src/contrib/mime_0.5.tar.gz' 
Content type 'application/x-gzip' length 12634 bytes (12 KB) 
================================================== 
downloaded 12 KB 

trying URL 'https://cloud.r-project.org/src/contrib/sourcetools_0.1.6.tar.gz' 
Content type 'application/x-gzip' length 24092 bytes (23 KB) 
================================================== 
downloaded 23 KB 

trying URL 'https://cloud.r-project.org/src/contrib/htmlwidgets_0.9.tar.gz' 
Content type 'application/x-gzip' length 944851 bytes (922 KB) 
================================================== 
downloaded 922 KB 

trying URL 'https://cloud.r-project.org/src/contrib/htmltools_0.3.6.tar.gz' 
Content type 'application/x-gzip' length 45408 bytes (44 KB) 
================================================== 
downloaded 44 KB 

trying URL 'https://cloud.r-project.org/src/contrib/knitr_1.17.tar.gz' 
Content type 'application/x-gzip' length 769923 bytes (751 KB) 
================================================== 
downloaded 751 KB 

trying URL 'https://cloud.r-project.org/src/contrib/jsonlite_1.5.tar.gz' 
Content type 'application/x-gzip' length 1096810 bytes (1.0 MB) 
================================================== 
downloaded 1.0 MB 

trying URL 'https://cloud.r-project.org/src/contrib/shiny_1.0.5.tar.gz' 
Content type 'application/x-gzip' length 2330710 bytes (2.2 MB) 
================================================== 
downloaded 2.2 MB 

trying URL 'https://cloud.r-project.org/src/contrib/rgl_0.98.1.tar.gz' 
Content type 'application/x-gzip' length 2624282 bytes (2.5 MB) 
================================================== 
downloaded 2.5 MB 

* installing *source* package ‘stringi’ ... 
** package ‘stringi’ successfully unpacked and MD5 sums checked 
checking for local ICUDT_DIR... icu55/data 
checking for R_HOME... /usr/lib/R 
checking for R... /usr/lib/R/bin/R 
checking for R >= 3.1.0 for C++11 use... yes 
checking for R < 3.4.0 for CXX1X flag use... no 
checking for cat... /bin/cat 
checking for gcc... gcc -std=gnu99 
checking whether the C compiler works... no 
configure: error: in `/tmp/RtmpSv852d/R.INSTALL521c32e70e07/stringi': 
configure: error: C compiler cannot create executables 
See `config.log' for more details 
ERROR: configuration failed for package ‘stringi’ 
* removing ‘/usr/local/lib/R/site-library/stringi’ 
* installing *source* package ‘yaml’ ... 
** package ‘yaml’ successfully unpacked and MD5 sums checked 
** libs 
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -DNDEBUG  -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c api.c -o api.o 
gcc: error: unrecognized command line option ‘-fstack-protector-strong’ 
gcc: error: unrecognized command line option ‘-Wdate-time’ 
/usr/lib/R/etc/Makeconf:159: recipe for target 'api.o' failed 
make: *** [api.o] Error 1 
ERROR: compilation failed for package ‘yaml’ 
* removing ‘/usr/local/lib/R/site-library/yaml’ 
* installing *source* package ‘digest’ ... 
** package ‘digest’ successfully unpacked and MD5 sums checked 
** libs 
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG  -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c aes.c -o aes.o 
gcc: error: unrecognized command line option ‘-fstack-protector-strong’ 
gcc: error: unrecognized command line option ‘-Wdate-time’ 
/usr/lib/R/etc/Makeconf:159: recipe for target 'aes.o' failed 
make: *** [aes.o] Error 1 
ERROR: compilation failed for package ‘digest’ 
* removing ‘/usr/local/lib/R/site-library/digest’ 
* installing *source* package ‘httpuv’ ... 
** package ‘httpuv’ successfully unpacked and MD5 sums checked 
** libs 
g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I./libuv/include -I./http-parser -I./sha1 -I./base64 -I"/usr/local/lib/R/site-library/Rcpp/include" -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c RcppExports.cpp -o RcppExports.o 
g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I./libuv/include -I./http-parser -I./sha1 -I./base64 -I"/usr/local/lib/R/site-library/Rcpp/include" -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c filedatasource-unix.cpp -o filedatasource-unix.o 
g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I./libuv/include -I./http-parser -I./sha1 -I./base64 -I"/usr/local/lib/R/site-library/Rcpp/include" -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c filedatasource-win.cpp -o filedatasource-win.o 
g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I./libuv/include -I./http-parser -I./sha1 -I./base64 -I"/usr/local/lib/R/site-library/Rcpp/include" -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c http.cpp -o http.o 
g++ -std=gnu++11 -I/usr/share/R/include -DNDEBUG -I./libuv/include -I./http-parser -I./sha1 -I./base64 -I"/usr/local/lib/R/site-library/Rcpp/include" -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c httpuv.cpp -o httpuv.o 
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I./libuv/include -I./http-parser -I./sha1 -I./base64 -I"/usr/local/lib/R/site-library/Rcpp/include" -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c md5.c -o md5.o 
gcc: error: unrecognized command line option ‘-fstack-protector-strong’ 
gcc: error: unrecognized command line option ‘-Wdate-time’ 
/usr/lib/R/etc/Makeconf:159: recipe for target 'md5.o' failed 
make: *** [md5.o] Error 1 
ERROR: compilation failed for package ‘httpuv’ 
* removing ‘/usr/local/lib/R/site-library/httpuv’ 
* installing *source* package ‘mime’ ... 
** package ‘mime’ successfully unpacked and MD5 sums checked 
** libs 
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG  -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c rawmatch.c -o rawmatch.o 
gcc: error: unrecognized command line option ‘-fstack-protector-strong’ 
gcc: error: unrecognized command line option ‘-Wdate-time’ 
/usr/lib/R/etc/Makeconf:159: recipe for target 'rawmatch.o' failed 
make: *** [rawmatch.o] Error 1 
ERROR: compilation failed for package ‘mime’ 
* removing ‘/usr/local/lib/R/site-library/mime’ 
* installing *source* package ‘sourcetools’ ... 
** package ‘sourcetools’ successfully unpacked and MD5 sums checked 
** libs 
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include  -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c Reader.cpp -o Reader.o 
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include  -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c Tokenizer.cpp -o Tokenizer.o 
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I../inst/include  -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c sourcetools-init.c -o sourcetools-init.o 
gcc: error: unrecognized command line option ‘-fstack-protector-strong’ 
gcc: error: unrecognized command line option ‘-Wdate-time’ 
/usr/lib/R/etc/Makeconf:159: recipe for target 'sourcetools-init.o' failed 
make: *** [sourcetools-init.o] Error 1 
ERROR: compilation failed for package ‘sourcetools’ 
* removing ‘/usr/local/lib/R/site-library/sourcetools’ 
* installing *source* package ‘jsonlite’ ... 
** package ‘jsonlite’ successfully unpacked and MD5 sums checked 
** libs 
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -Iyajl/api  -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c base64.c -o base64.o 
gcc: error: unrecognized command line option ‘-fstack-protector-strong’ 
gcc: error: unrecognized command line option ‘-Wdate-time’ 
/usr/lib/R/etc/Makeconf:159: recipe for target 'base64.o' failed 
make: *** [base64.o] Error 1 
ERROR: compilation failed for package ‘jsonlite’ 
* removing ‘/usr/local/lib/R/site-library/jsonlite’ 
ERROR: dependency ‘mime’ is not available for package ‘markdown’ 
* removing ‘/usr/local/lib/R/site-library/markdown’ 
ERROR: dependency ‘stringi’ is not available for package ‘stringr’ 
* removing ‘/usr/local/lib/R/site-library/stringr’ 
ERROR: dependency ‘digest’ is not available for package ‘htmltools’ 
* removing ‘/usr/local/lib/R/site-library/htmltools’ 
ERROR: dependency ‘stringr’ is not available for package ‘evaluate’ 
* removing ‘/usr/local/lib/R/site-library/evaluate’ 
ERROR: dependencies ‘htmltools’, ‘jsonlite’, ‘yaml’ are not available for package ‘htmlwidgets’ 
* removing ‘/usr/local/lib/R/site-library/htmlwidgets’ 
ERROR: dependencies ‘httpuv’, ‘mime’, ‘jsonlite’, ‘digest’, ‘htmltools’, ‘sourcetools’ are not available for package ‘shiny’ 
* removing ‘/usr/local/lib/R/site-library/shiny’ 
ERROR: dependencies ‘evaluate’, ‘digest’, ‘markdown’, ‘stringr’, ‘yaml’ are not available for package ‘knitr’ 
* removing ‘/usr/local/lib/R/site-library/knitr’ 
ERROR: dependencies ‘htmlwidgets’, ‘htmltools’, ‘knitr’, ‘jsonlite’, ‘shiny’ are not available for package ‘rgl’ 
* removing ‘/usr/local/lib/R/site-library/rgl’ 

The downloaded source packages are in 
    ‘/tmp/Rtmpa3Hizf/downloaded_packages’ 
There were 15 warnings (use warnings() to see them) 

전체 R 버전 정보 :

여기
installation of package ‘rgl’ had non-zero exit status 

전체 경고의 목록은 다음과 같습니다 문제는이 오류가 계속된다

> version 
      _       
platform  x86_64-pc-linux-gnu   
arch   x86_64      
os    linux-gnu     
system   x86_64, linux-gnu   
status          
major   3       
minor   4.2       
year   2017       
month   09       
day   28       
svn rev  73368      
language  R       
version.string R version 3.4.2 (2017-09-28) 
nickname  Short Summer 

Linux Mint 1 8.2. 그 오류 메시지에 대해 더 많은 질문이 있다는 것을 알고 있지만 실제로 작동하는 해결책을 찾지 못했습니다. 이것은 기본적으로 새로 설치 한 것입니다. 구성 파일을 변경하지 않았으며 루트 권한이 있거나없는이 패키지를 설치하려고했습니다. 누구든지이 원인을 알 수 있습니까?

+0

'sudo apt-get install r-cran-rgl'을 고려하십시오. –

+0

@DirkEddelbuettel 이미 설치했으나 여전히 작동하지 않습니다. –

+1

그렇지 않으면 R 바이너리가 시스템과 연결이 끊어졌습니다. 그것은 작동하지 않는 컴파일러 옵션 (빌드 된 것으로 생각되는)을 사용하려고합니다. 그것은 보통 적절한 설치에서 발생할 수 없습니다. 아마 데비안 또는 우분투 바이너리를 설치했을 것입니다. "모두 데비안과 우분투에서 작동합니다."나는 민트를 모른다. 죄송합니다. –

답변

0

r-sig-debian 메일 링리스트의 Harutyun Khachatryan 덕분에 문제가 해결되었습니다.
해결책은 다음과 같습니다. https://askubuntu.com/questions/26498/choose-gcc-and-g-version

유일한 차이점은 gcc 및 g ++을 버전 4.8 및 4.9 (4.3 및 4.4 대신)로 사용한다는 것입니다. 나는 그것을 해결하기 위해 사용

모든 명령 :

sudo update-alternatives --remove-all gcc 
sudo update-alternatives --remove-all g++ 
sudo apt-get install gcc-4.3 gcc-4.4 g++-4.3 g++-4.4 
sudo apt-get install gcc-4.8 gcc-4.8 g++-4.9 g++-4.9 
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 10 
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20 
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 10 
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20 
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30 
sudo update-alternatives --set cc /usr/bin/gcc 
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30 
sudo update-alternatives --set c++ /usr/bin/g++ 
sudo update-alternatives --config gcc 
sudo update-alternatives --config g++ 

지금 R의 패키지가 성공적으로 컴파일됩니다.