Ubuntu installation of package ‘tidyverse’ had non-zero exit status - r

Hello I am using R with Ubuntu 18.0.4 and having trouble to install packages. I have installed
sudo apt-get install libcurl4-openssl-dev
but still it produces the following error
installing source package ‘labelled’ ...
package ‘labelled’ successfully unpacked and MD5 sums checked
R
inst
preparing package for lazy loading
Warning: S3 methods ‘[.fun_list’, ‘[.grouped_df’, ‘all.equal.tbl_df’, ‘anti_join.data.frame’, ‘anti_join.tbl_df’, ‘arrange.data.frame’, ‘arrange.default’, ‘arrange.grouped_df’, ‘arrange.tbl_df’, ‘arrange_.data.frame’, ‘arrange_.tbl_df’, ‘as.data.frame.grouped_df’, ‘as.data.frame.rowwise_df’, ‘as.data.frame.tbl_cube’, ‘as.data.frame.tbl_df’, ‘as.table.tbl_cube’, ‘as.tbl.data.frame’, ‘as.tbl.tbl’, ‘as.tbl_cube.array’, ‘as.tbl_cube.data.frame’, ‘as.tbl_cube.matrix’, ‘as.tbl_cube.table’, ‘as_data_frame.grouped_df’, ‘as_data_frame.tbl_cube’, ‘auto_copy.tbl_cube’, ‘auto_copy.tbl_df’, ‘cbind.grouped_df’, ‘collapse.data.frame’, ‘collect.data.frame’, ‘common_by.NULL’, ‘common_by.character’, ‘common_by.default’, ‘common_by.list’, ‘compute.data.frame’, ‘copy_to.DBIConnection’, ‘copy_to.src_local’, ‘default_missing.data.frame’, ‘default_missing.default’, �� [... truncated]
Error in library.dynam(lib, package, package.lib) :
shared object ‘dplyr.so’ not found
ERROR: lazy loading failed for package ‘labelled’
removing ‘/home/sami/R/x86_64-pc-linux-gnu-library/3.4/labelled’
The downloaded source packages are in
‘/tmp/RtmpZbHxk1/downloaded_packages’
Warning message:
In install.packages("labelled") :
installation of package ‘labelled’ had non-zero exit status

Try installing the following libraries: libxml2-dev, libssl-dev and libcurl4-openssl-dev. Try to install them all using the apt command.
Greetings!

Related

Errors when trying to install 'semPlot' R package

I'm trying to install the package 'semPlot' in RStudio, and keep getting errors:
** testing if installed package can be loaded from temporary location
*** arch - i386
Error: package or namespace load failed for 'rockchalk' in library.dynam(lib, package, package.lib):
DLL 'zip' not found: maybe not installed for this architecture?
Error: loading failed
Execution halted
*** arch - x64
ERROR: loading failed for 'i386'
* removing 'C:/Documents/R/win-library/4.0/rockchalk'
Warning in install.packages :
installation of package ‘rockchalk’ had non-zero exit status
ERROR: failed to lock directory 'C:/Documents/R/win-library/4.0' for modifying
Try removing 'C:/Documents/R/win-library/4.0/00LOCK-OpenMx'
Warning in install.packages :
installation of package ‘OpenMx’ had non-zero exit status
ERROR: dependencies 'rockchalk', 'OpenMx' are not available for package 'semPlot'
* removing 'C:/Documents/R/win-library/4.0/semPlot'
Warning in install.packages :
installation of package ‘semPlot’ had non-zero exit status
The downloaded source packages are in
‘C:\AppData\Local\Temp\RtmpE9qK0s\downloaded_packages’
I already installed the package ‘rockchalk’, but it didn't help.
The first time I tried to install 'semPlot' there was an almost endless process which also ended with an error.
You could use the install_github function to install R packages hosted on GitHub from the devtools package. Here is a reproducible example:
devtools::install_github('SachaEpskamp/semPlot')
library(semPlot)
Created on 2022-11-14 with reprex v2.0.2
I solved it by uninstalling R and RStudio, and then installing them, and googling a small problem that came up with tydiverse.

R: compilation failed for package ‘dplyr’

I am trying to install R packages in ubuntu 14.04. All other packages installed successfully, but 'dplyr' package failed to install.
I used the command below:
sudo su - -c "R -e \"install.packages('dplyr', repos = 'http://cran.rstudio.com/')\""
....
ERROR: compilation failed for package ‘dplyr’
* removing ‘/usr/local/lib/R/site-library/dplyr’
The downloaded source packages are in
‘/tmp/RtmpiKWYoQ/downloaded_packages’
Warning message:
In install.packages("dplyr", repos = "http://cran.rstudio.com/") :
installation of package ‘dplyr’ had non-zero exit status
R version 3.2.4 Revised

Failed to install devtools in R 3.1.2

I was trying to install the devtools package in Rstudio by install.packages("devtools") but failed. The error messages are:
* installing *source* package ‘xml2’ ...
** package ‘xml2’ successfully unpacked and MD5 sums checked
Package libxml-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libxml-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libxml-2.0' found
Package libxml-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libxml-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libxml-2.0' found
Could not find libxml2. Please install libxml2-devel (rpm) or libxml2-dev (deb).
ERROR: configuration failed for package ‘xml2’
* removing ‘/home/xwang/R/x86_64-pc-linux-gnu-library/3.1/xml2’
Warning in install.packages :
installation of package ‘xml2’ had non-zero exit status
ERROR: dependency ‘xml2’ is not available for package ‘rversions’
* removing ‘/home/xwang/R/x86_64-pc-linux-gnu-library/3.1/rversions’
Warning in install.packages :
installation of package ‘rversions’ had non-zero exit status
ERROR: dependency ‘rversions’ is not available for package ‘devtools’
* removing ‘/home/xwang/R/x86_64-pc-linux-gnu-library/3.1/devtools’
Warning in install.packages :
installation of package ‘devtools’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpYccDpT/downloaded_packages’
Looks like it has trouble finding libxml-2.0. Does anyone know an easy fix to this? I'm using R version 3.1.2.
Eventually I fixed the problem by:
sudo apt-get install libxml2-dev
Then another problems popped up:
Error : object ‘curl_fetch_memory’ is not exported by 'namespace:curl'
which can be solved by installing the curl package:
install.packages("curl")
You just need to update to the newest version of R (R version 3.2.1)
It require some developer libraries (sources): curl developer, xml2 developer as dependecy.
so install it with the package repository (yum, dnf, apt-get) and retry to install the devtools package in R.

R Packages Installation Error on Ubuntu

I am trying to install the R package "colorspace" in Ubuntu Linux from local repository as follows:
install.packages("/home/colorspace_1.2-4.tar.gz", repos = NULL, type="source")
This throws the following error:
Installing package into '/home/vertica/R/x86_64-unknown-linux-gnu-library/3.0'
(as 'lib' is unspecified)
* installing *source* package 'colorspace' ...
** package 'colorspace' successfully unpacked and MD5 sums checked
** libs
sh: make: command not found
ERROR: compilation failed for package 'colorspace'
* removing '/home/vertica/R/x86_64-unknown-linux-gnu-library/3.0/colorspace'
Warning message:
In install.packages("/home/colorspace_1.2-4.tar.gz", :
installation of package '/home/colorspace_1.2-4.tar.gz' had non-zero exit
status
Could someone help me with this issue?
Thank you.
Ravi
Its saying it can't find "make", which makes me think you don't have all the compilers and so on that you need to build packages from source.
Install the "build-essential" package, something like:
sudo apt-get install build-essential
from your command line (not from R!)

Error while installing R packages

While trying to install the 'Rook' package in R i'm getting the following error:
** package ‘Rook’ successfully unpacked and MD5 sums checked
** libs
sh: 1: -f: not found
ERROR: compilation failed for package ‘Rook’
* removing ‘/usr/lib/R/site-library/Rook’
The downloaded packages are in
‘/tmp/RtmpPW6kC2/downloaded_packages’
Warning message:
In install.packages("Rook", repos = "http://cran.r-project.org") :
installation of package ‘Rook’ had non-zero exit status
I used both the install.packages() function and the terminal to install the package, but received the same message. Any ideas?
OS: Ubuntu 12.04.

Resources