2017-05-28 2 views
3

Ich versuche devtools in meinem RStudio zu installieren. Aber ich Tonnen von Fehlern erhalten:R/RStudio - install devtools schlägt fehl?

* installing *source* package ‘curl’ ... 
** package ‘curl’ successfully unpacked and MD5 sums checked 
Package libcurl was not found in the pkg-config search path. 
Perhaps you should add the directory containing `libcurl.pc' 
to the PKG_CONFIG_PATH environment variable 
No package 'libcurl' found 
Package libcurl was not found in the pkg-config search path. 
Perhaps you should add the directory containing `libcurl.pc' 
to the PKG_CONFIG_PATH environment variable 
No package 'libcurl' found 
Using PKG_CFLAGS= 
Using PKG_LIBS=-lcurl 
------------------------- ANTICONF ERROR --------------------------- 
Configuration failed because libcurl was not found. Try installing: 
* deb: libcurl4-openssl-dev (Debian, Ubuntu, etc) 
* rpm: libcurl-devel (Fedora, CentOS, RHEL) 
* csw: libcurl_dev (Solaris) 
If libcurl is already installed, check that 'pkg-config' is in your 
PATH and PKG_CONFIG_PATH contains a libcurl.pc file. If pkg-config 
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via: 
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...' 
-------------------------------------------------------------------- 
ERROR: configuration failed for package ‘curl’ 
* removing ‘/home/lau/R/x86_64-pc-linux-gnu-library/3.4/curl’ 
Warning in install.packages : 
    installation of package ‘curl’ had non-zero exit status 
* installing *source* package ‘openssl’ ... 
** package ‘openssl’ successfully unpacked and MD5 sums checked 
Using PKG_CFLAGS= 
Using PKG_LIBS=-lssl -lcrypto 
------------------------- ANTICONF ERROR --------------------------- 
Configuration failed because openssl was not found. Try installing: 
* deb: libssl-dev (Debian, Ubuntu, etc) 
* rpm: openssl-devel (Fedora, CentOS, RHEL) 
* csw: libssl_dev (Solaris) 
* brew: [email protected] (Mac OSX) 
If openssl is already installed, check that 'pkg-config' is in your 
PATH and PKG_CONFIG_PATH contains a openssl.pc file. If pkg-config 
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via: 
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...' 
-------------------------------------------------------------------- 
ERROR: configuration failed for package ‘openssl’ 
* removing ‘/home/lau/R/x86_64-pc-linux-gnu-library/3.4/openssl’ 
Warning in install.packages : 
    installation of package ‘openssl’ had non-zero exit status 
* installing *source* package ‘git2r’ ... 
** package ‘git2r’ successfully unpacked and MD5 sums checked 
checking build system type... x86_64-unknown-linux-gnu 
checking host system type... x86_64-unknown-linux-gnu 
checking for gcc... gcc 
checking whether the C compiler works... yes 
checking for C compiler default output file name... a.out 
checking for suffix of executables... 
checking whether we are cross compiling... no 
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 for library containing inflate... -lz 
checking for pkg-config... /usr/bin/pkg-config 
checking pkg-config is at least version 0.9.0... yes 
checking for libssl... no 
configure: WARNING: "pkg-config failed to find libssl." 
checking for library containing EVP_EncryptInit... no 
configure: error: in `/tmp/RtmpWzaIce/R.INSTALL67fa335a4d20/git2r': 
configure: error: 
    --------------------------------------------- 
    The OpenSSL library that is required to 
    build git2r was not found. 

    Please install: 
    libssl-dev (package on e.g. Debian and Ubuntu) 
    openssl-devel (package on e.g. Fedora, CentOS and RHEL) 
    openssl  (Homebrew package on OS X) 
    and try again. 

    If the OpenSSL library is installed on 
    your system but the git2r configuration 
    is unable to find it, you can specify 
    the include and lib path to OpenSSL with: 
    R CMD INSTALL --configure-args='--with-libssl-include=INCLUDE_PATH --with-libssl-lib=LIB_PATH' git2r 
    --------------------------------------------- 
See `config.log' for more details 
ERROR: configuration failed for package ‘git2r’ 
* removing ‘/home/lau/R/x86_64-pc-linux-gnu-library/3.4/git2r’ 
Warning in install.packages : 
    installation of package ‘git2r’ had non-zero exit status 
ERROR: dependencies ‘curl’, ‘openssl’ are not available for package ‘httr’ 
* removing ‘/home/lau/R/x86_64-pc-linux-gnu-library/3.4/httr’ 
Warning in install.packages : 
    installation of package ‘httr’ had non-zero exit status 
ERROR: dependencies ‘httr’, ‘git2r’ are not available for package ‘devtools’ 
* removing ‘/home/lau/R/x86_64-pc-linux-gnu-library/3.4/devtools’ 
Warning in install.packages : 
    installation of package ‘devtools’ had non-zero exit status 

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

Also habe ich versucht libcurl zu installieren:

> install.packages("libcurl") 
Installing package into ‘/home/lau/R/x86_64-pc-linux-gnu-library/3.4’ 
(as ‘lib’ is unspecified) 
Warning in install.packages : 
    package ‘libcurl’ is not available (for R version 3.4.0) 
> install.packages("curl") 

Ich bin auf Ubuntu 17.04. Und R 3.4.

Irgendwelche Ideen, wie ich das beheben kann?

+1

Können Sie versuchen, Sudo apt-get installieren libssl-dev – akrun

+0

@akrun danke. es funktioniert jetzt. – laukok

Antwort

6

Die Fehlermeldungen können etwas verwirrend sein, da RStudio Sie bittet, libcurl- und openssl-Bibliotheken für Ihr Linux-Betriebssystem zu installieren. Für diese benötigen Sie eigentlich Ubuntu-Pakete statt R-Pakete.

eine Befehlszeile Terminal öffnen und

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

geben Sobald die Installation des Ubuntu-Pakete abgeschlossen ist, versuchen Sie es erneut, und Sie werden in der Lage sein, die devtools R Paket

+1

Das funktionierte für mich auf Ubuntu 16.04. Sie ** brauchen ** nicht, um RStudio zu schließen und wieder zu öffnen, damit es funktioniert. – Fear

+0

Redigiert, um das klar zu machen, danke – HAVB

2

Wir können die Installation verwenden

sudo apt-get install libssl-dev