ERROR while installing "swirl" package in Rstudio - r

i tried to install "swirl" but i got this error
ERROR: configuration failed for package ‘openssl’
* removing ‘/home/mahmoudelshaer/R/x86_64-redhat-linux-gnu-library/3.6/openssl’
Warning in install.packages :
installation of package ‘openssl’ had non-zero exit status
* installing source package ‘RCurl’ ...
** package ‘RCurl’ successfully unpacked and MD5 sums checked
** using staged installation
checking for curl-config... no
Cannot find curl-config
ERROR: configuration failed for package ‘RCurl’
* removing ‘/home/mahmoudelshaer/R/x86_64-redhat-linux-gnu-library/3.6/RCurl’
Warning in install.packages :
installation of package ‘RCurl’ had non-zero exit status
ERROR: dependencies ‘curl’, ‘openssl’ are not available for package ‘httr’
* removing ‘/home/mahmoudelshaer/R/x86_64-redhat-linux-gnu-library/3.6/httr’
Warning in install.packages :
installation of package ‘httr’ had non-zero exit status
ERROR: dependencies ‘httr’, ‘RCurl’ are not available for package ‘swirl’
* removing ‘/home/mahmoudelshaer/R/x86_64-redhat-linux-gnu-library/3.6/swirl’
Warning in install.packages :
installation of package ‘swirl’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpkcuO45/downloaded_packages’
library("Swirl")
Error in library("Swirl") : there is no package called ‘Swirl’
i also tried solution from other similar question
sudo dnf install libssl-dev
Last metadata expiration check: 0:18:30 ago on Wed 27 May 2020 11:37:04 AM EET.
No match for argument: libssl-dev
Error: Unable to find a match: libssl-dev

I solve it
As a Fedora 32 user, i run those commands in terminal and they solved my problem
1st
sudo dnf install libcurl4-openssl-dev
2nd
sudo dnf groupinstall 'Development Tools' 'Development Libraries'
3rd
sudo dnf install zlib-devel libyaml-devel openssl-devel gdbm-devel readline-devel ncurses-devel libffi-devel curl git openssh-server redis libxml2-devel libxslt-devel libcurl-devel libicu-devel python
then in RStudio i typed
install.packages("swirl", dependencies = TRUE)
and it worked successfully
to check##
library("swirl")
| Hi! Type swirl() when you are ready to begin.

Related

Install AER package of R on AWS E2

I am having trouble in installing "AER" on my AWS E2.
The following is the message:
------------------ CMAKE NOT FOUND --------------------
CMake was not found on the PATH. Please install CMake:
sudo yum install cmake (Fedora/CentOS; inside a terminal)
sudo apt install cmake (Debian/Ubuntu; inside a terminal).
sudo pacman -S cmake (Arch Linux; inside a terminal).
sudo brew install cmake (MacOS; inside a terminal with Homebrew)
sudo port install cmake (MacOS; inside a terminal with MacPorts)
Alternatively install CMake from: https://cmake.org/
ERROR: configuration failed for package ‘nloptr’
removing ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/4.0/nloptr’
Warning in install.packages :
installation of package ‘nloptr’ had non-zero exit status
ERROR: dependency ‘nloptr’ is not available for package ‘lme4’
removing ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/4.0/lme4’
Warning in install.packages :
installation of package ‘lme4’ had non-zero exit status
ERROR: dependency ‘lme4’ is not available for package ‘pbkrtest’
removing ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/4.0/pbkrtest’
Warning in install.packages :
installation of package ‘pbkrtest’ had non-zero exit status
ERROR: dependencies ‘pbkrtest’, ‘lme4’ are not available for package ‘car’
removing ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/4.0/car’
Warning in install.packages :
installation of package ‘car’ had non-zero exit status
ERROR: dependency ‘car’ is not available for package ‘ivreg’
removing ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/4.0/ivreg’
Warning in install.packages :
installation of package ‘ivreg’ had non-zero exit status

Non-zero exit status package installation error on RStudio server

I've been trying to run an LGCP in 'inlabru' that was taking forever so I've been set up with a Unix account to access an RStudio server. The trouble is now I am getting non-zero exit status installation errors for a few packages. Specifically 'rgdal' and 'inlabru'. I have tried (for 'rgdal') installing the dependencies and PROJ/GDAL without any success. The end of the error is:
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/rgdal’
Warning in install.packages :
installation of package ‘rgdal’ had non-zero exit status
ERROR: dependency ‘systemfonts’ is not available for package ‘svglite’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/svglite’
Warning in install.packages :
installation of package ‘svglite’ had non-zero exit status
ERROR: dependency ‘terra’ is not available for package ‘raster’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/raster’
Warning in install.packages :
installation of package ‘raster’ had non-zero exit status
ERROR: dependencies ‘s2’, ‘units’ are not available for package ‘sf’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/sf’
Warning in install.packages :
installation of package ‘sf’ had non-zero exit status
ERROR: dependency ‘raster’ is not available for package ‘leaflet’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/leaflet’
Warning in install.packages :
installation of package ‘leaflet’ had non-zero exit status
ERROR: dependencies ‘sf’, ‘svglite’ are not available for package ‘leafpop’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/leafpop’
Warning in install.packages :
installation of package ‘leafpop’ had non-zero exit status
ERROR: dependencies ‘raster’, ‘terra’ are not available for package ‘satellite’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/satellite’
Warning in install.packages :
installation of package ‘satellite’ had non-zero exit status
ERROR: dependencies ‘leaflet’, ‘raster’, ‘sf’ are not available for package ‘leafem’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/leafem’
Warning in install.packages :
installation of package ‘leafem’ had non-zero exit status
ERROR: dependencies ‘leafem’, ‘leaflet’, ‘leafpop’, ‘raster’, ‘satellite’, ‘sf’ are not available for package ‘mapview’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/mapview’
Warning in install.packages :
installation of package ‘mapview’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmp57pHoc/downloaded_packages’
I am thinking it is the library that is failing the installation because it's a server, but I've tried changing .libPaths() to a folder on my drive with no success. I have also tried running
install.packages("rgdal", type="source", repos="http://R-Forge.R-project.org", configure.args=c('--with-gdal-config=/opt/local/bin/gdal-config'))
and get
configure: error: gdal-config not found - configure argument error.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/rgdal’
Warning in install.packages :
installation of package ‘rgdal’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmp57pHoc/downloaded_packages’
Any help is greatly appreciated!
gdal (and friends) are not installed
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install libudunits2-dev libgdal-dev libgeos-dev libproj-dev

Keras installation failed with Rstudio RcppTOML had non-zero exit status

I am struggling to install keras on my Rstudio version 2021.09.2 Build 382 (R version 3.6.0 (2019-04-26)) on Linux Centos 7. I am having this error message:
ERROR: compilation failed for package ‘RcppTOML’
* removing ‘/usr/lib64/R/library/RcppTOML’
ERROR: dependency ‘RcppTOML’ is not available for package ‘reticulate’
* removing ‘/usr/lib64/R/library/reticulate’
ERROR: dependency ‘reticulate’ is not available for package ‘tfautograph’
* removing ‘/usr/lib64/R/library/tfautograph’
ERROR: dependency ‘reticulate’ is not available for package ‘tfruns’
* removing ‘/usr/lib64/R/library/tfruns’
ERROR: dependencies ‘reticulate’, ‘tfruns’, ‘tfautograph’ are not available for package ‘tensorflow’
* removing ‘/usr/lib64/R/library/tensorflow’
ERROR: dependencies ‘reticulate’, ‘tensorflow’, ‘tfruns’ are not available for package ‘keras’
* removing ‘/usr/lib64/R/library/keras’
I tried to install manually directly from the tar, but I still have the same error.
1: In install.packages("keras") :
installation of package ‘RcppTOML’ had non-zero exit status
2: In install.packages("keras") :
installation of package ‘reticulate’ had non-zero exit status
3: In install.packages("keras") :
installation of package ‘tfautograph’ had non-zero exit status
4: In install.packages("keras") :
installation of package ‘tfruns’ had non-zero exit status
5: In install.packages("keras") :
installation of package ‘tensorflow’ had non-zero exit status
6: In install.packages("keras") :
installation of package ‘keras’ had non-zero exit status
Any idea how to solve it?
Thanks.
I finally understood, there is a bug on CentOS 7: RcppTOML fails to compile with g++ 4.8.5 (20150623), but installs with g++ 5.3.1 (20160406) from scl-devtoolset-4.
sudo yum install centos-release-scl
sudo yum install devtoolset-7-gcc*
scl enable devtoolset-7 bash
These lines fixed the issue
As described in the comments the older version of RcppTOML also works; This is a lighter stack then the accepted answer.
install.packages("devtools")
require(devtools)
install_version("RcppTOML", version = "0.1.3", repos = "http://cran.us.r-project.org")
To install an older version the easiest way is to use devtools.

configuration failed for xml2 while installing tidyverse in r studio

system: ubuntu 18.04
Rstudio version 3.4.4
Whenever i try to install tidyverse this error comes up, how do i add the directory containing the lib-curl to the package configuration search path?
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
.
.
.
.
ERROR: configuration failed for package ‘xml2’
removing ‘/home/javed/R/x86_64-pc-linux-gnu-library/3.4/xml2’
Warning in install.packages :
installation of package ‘xml2’ had non-zero exit status
ERROR: dependencies ‘curl’, ‘openssl’ are not available for package ‘httr’
* removing ‘/home/javed/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 ‘xml2’, ‘httr’ are not available for package ‘rvest’
* removing ‘/home/javed/R/x86_64-pc-linux-gnu-library/3.4/rvest’
Warning in install.packages :
installation of package ‘rvest’ had non-zero exit status
ERROR: dependencies ‘httr’, ‘rvest’, ‘xml2’ are not available for package ‘tidyverse’
* removing ‘/home/javed/R/x86_64-pc-linux-gnu-library/3.4/tidyverse’
Warning in install.packages :
installation of package ‘tidyverse’ had non-zero exit status
Install these missing dependencies before installing R packages:
sudo apt install libcurl4-openssl-dev libssl-dev libxml2-dev
Source: https://blog.zenggyu.com/en/post/2018-01-29/installing-r-r-packages-e-g-tidyverse-and-rstudio-on-ubuntu-linux/
Quit R and open up a command window and confirm that libcurl is indeed not installed on Ubuntu
apt list --installed | grep libcurl
You should see no results.
Install the package
sudo apt update
sudo apt install libcurl4-openssl-dev
Open up R and reinstall tidyverse.
If you still get error messages in R, you might have to install additional missing Linux packages by repeating similar steps.

Error installing "Quandl" in R 3.1.1

I have installed R 3.1. and RStudio 1.0.44 in BunsenLabs (Debian Jessie)
and I want to install the Quandl package.
In R console I write:
install.packages("Quandl")
and the output is:
ERROR: configuration failed for package ‘openssl’
* removing
ERROR: dependency ‘openssl’ is not available for package ‘httr’
* removing
ERROR: dependency ‘httr’ is not available for package ‘Quandl’
* removing
Warning in install.packages :
installation of package ‘Quandl’ had non-zero exit status
library(Quandl)
Error in library(Quandl) : there is no package called ‘Quandl’
Thanks,
RTA
Solution, write in linux terminal:
sudo apt-get install r-cran-openssl
Thanks

Resources