Recently, I started to learn R language by using Rstudio, but when I tied to install some packages i had some problems.
When I try to install the "rvest" package, it give the errors as following:
> install.packages("rvest")Installing package into ‘/home/zm/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)also installing the dependencies ‘openssl’, ‘httr’
??URL’https://cran.rstudio.com/src/contrib/openssl_0.9.7.tar.gz'Content type 'application/x-gzip' length 1243577 bytes (1.2 MB)==================================================downloaded 1.2 MB
??URL’https://cran.rstudio.com/src/contrib/httr_1.3.1.tar.gz'Content type 'application/x-gzip' length 147593 bytes (144 KB)==================================================downloaded 144 KB
??URL’https://cran.rstudio.com/src/contrib/rvest_0.3.2.tar.gz'Content type 'application/x-gzip' length 1597137 bytes (1.5 MB)==================================================downloaded 1.5 MB
* installing *source* package ‘openssl’ ...** ???‘openssl’??????MD5???Using PKG_CFLAGS=
------------------------- 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/zm/R/x86_64-pc-linux-gnu-library/3.4/openssl’Warning in install.packages :
installation of package ‘openssl’ had non-zero exit statusERROR: dependency ‘openssl’ is not available for package ‘httr’* removing ‘/home/zm/R/x86_64-pc-linux-gnu-library/3.4/httr’Warning in install.packages :
installation of package ‘httr’ had non-zero exit statusERROR: dependency ‘httr’ is not available for package ‘rvest’* removing ‘/home/zm/R/x86_64-pc-linux-gnu-library/3.4/rvest’Warning in install.packages :
installation of package ‘rvest’ had non-zero exit status
The downloaded source packages are in ‘/tmp/RtmpuOfZU9/downloaded_packages’
I think the following is the key point of my problem:
The configuration failed because openssl
wasn't found.
I tried to install:
- 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=...'
I also started to install the packages in Ubuntu. However, I even didn't success to install them in Ubuntu.
And I also tried the following method: export PKG_CONFIG_PATH=/cv/lib:$PKG_CONFIG_PATH
Without success..
Could somebody help me to figure out what happened, thank you very much!