2017-10-15 13 views
0

J'ai installé R et j'ai essayé d'installer un paquet supplémentaire: rgl. Le problème est, je continue à avoir cette erreur:Installation du paquet R sous Linux

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

Voici une liste complète des mises en garde:

> 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 

Et le journal complet d'installation:

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

Version complète R info:

> 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 

J'utilise Linux Mint 1 8.2. Je sais qu'il y a plus de questions à propos de ce message d'erreur, mais je n'ai trouvé aucune solution de travail. Ceci est fondamentalement nouvelle installation, je n'ai pas changé les fichiers de configuration et essayé d'installer ce paquet avec et sans autorisations root. Est-ce que quelqu'un sait ce qui peut causer cela?

+0

Considérons 'sudo apt-get install r-cran-rgl'. –

+0

@DirkEddelbuettel Je l'ai déjà installé et ça ne marche toujours pas. –

+1

Sinon, votre binaire R est déconnecté de votre système. Il veut utiliser les options du compilateur (avec lesquelles il pense avoir été construit) qui ne fonctionnent pas. Cela ne peut généralement pas se produire lors d'une installation correcte. Vous avez probablement installé un binaire Debian ou Ubuntu. "Tout fonctionne sur Debian et Ubuntu" et je ne connais pas Mint. Pardon. –

Répondre

0

J'ai corrigé cette erreur grâce à Harutyun Khachatryan de la liste de diffusion r-sig-debian.
La solution est ici: https://askubuntu.com/questions/26498/choose-gcc-and-g-version

La seule différence est que je gcc et g ++ avec les versions 4.8 et 4.9 (au lieu de 4.3 et 4.4).

Toutes les commandes que je l'habitude de le corriger:

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++ 

Maintenant, les paquets en R sont compilés avec succès.