I'd like to use the gganimate package, but it requires gifski which is failing.
* installing *source* package ‘gifski’ ...
** package ‘gifski’ successfully unpacked and MD5 sums checked
------------------ RUST COMPILER NOT FOUND --------------------
Cargo was not found on the PATH. Please install cargo / rustc:
- yum install cargo (Fedora/CentOS)
- apt-get install cargo (Debian/Ubuntu)
- brew install rustc (MacOS)
Alternatively install Rust from: <https://www.rust-lang.org>
---------------------------------------------------------------
ERROR: configuration failed for package ‘gifski’
* removing ‘/home/User/R/x86_64-pc-linux-gnu-library/3.5/gifski’
Warning in install.packages :
installation of package ‘gifski’ had non-zero exit status
It says I need to install Rust, but I've done that. I ran these commands and then rebooted.
curl https://sh.rustup.rs -sSf | sh
export PATH="$HOME/.cargo/bin:$PATH"
I'm on a CentOS Linux machine hosted on EC2.
If you're in linux Ubuntu, first install rust compiler:
terminal > sudo apt-get install cargo
then, install gifski from github:
devtool::install_github("r-rust/gifski")
or using remotes package:
remotes::install_github("r-rust/gifski")
i hope i helped you.
Related
Warning in install.packages :
installation of package ‘googledrive’ had non-zero exit status
ERROR: dependencies ‘curl’, ‘gargle’, ‘googledrive’, ‘httr’, ‘ids’ are not available for package ‘googlesheets4’
* removing ‘/home/lanewhitten/R/x86_64-redhat-linux-gnu-library/4.0/googlesheets4’
Warning in install.packages :
installation of package ‘googlesheets4’ had non-zero exit status
ERROR: dependencies ‘googledrive’, ‘googlesheets4’, ‘httr’, ‘rvest’ are not available for package ‘tidyverse’
* removing ‘/home/lanewhitten/R/x86_64-redhat-linux-gnu-library/4.0/tidyverse’
Warning in install.packages :
installation of package ‘tidyverse’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpxCRrL7/downloaded_packages’
That is the tail of my error messages. Ive already installed curl on fedora using
sudo dnf install curl
I am at a total loss as to how to resolve this and switching operating systems or running a virtual machine is not an option for me.
The development packages which are not specified in the error message need to be installed
sudo dnf install libcurl-devel
sudo dnf install openssl-devel
then do install.packages("tidyverse")
This will make your R experience on Fedora much easier
Unfortunately, CRAN does not provide binaries for Linux. That is why, by default install.packages() will compile any package you install from source. Many packages require developer libraries to be installed on the system for compilation. The lack of these packages is why you got the error.
Overall, compiling packages yourself is far from ideal. All packages will take a longer time to install. Especially when you do them infrequently, updates will take an eternity. Also, finding out which system developer packages to install alongside can be time consuming as well, particularly for beginners.
Luckily, there is a COPR repository for Fedora that provides up-to-date binaries for all CRAN packages. All you have to do is run these few lines in the system terminal (not R console):
sudo dnf install 'dnf-command(copr)'
sudo dnf copr enable iucar/cran
sudo dnf install R-CoprManager
Afterwards install.packages() in R will install the desired packages through the system package manager. This also means that you will receive R package updates whenever you run dnf update or update the system with your desktop environments software management GUI.
You can find further documentation about this on the CRAN website.
I have Fedora Workstation 34.
I have installed gdal-devel rpm on my system:
sudo dnf install gdal-devel
Now I am trying to install the R rgdal package.
But the installation fails with the following error message:
configure: API to be used as yet undetermined, searching ...
configure: error: API to be used not found
ERROR: configuration failed for package ‘rgdal’
* removing ‘/home/raffaele/R/x86_64-redhat-linux-gnu-library/4.0/rgdal’
The downloaded source packages are in
‘/tmp/RtmpZRbq1a/downloaded_packages’
✔ Package 'rgdal' successfully installed.
Warning message:
In utils::install.packages("rgdal", repos = "https://cran.rstudio.com/") :
installation of package ‘rgdal’ had non-zero exit status
Please note that in the above the
Package 'rgdal' successfully installed.
is wrong.
In particular it looks like it can't find an API.
How can I fix this problem and install the rgdal R package?
The above instructions are for Debian/Ubuntu or similar. Dependencies in Linux need to be installed separately as indicated in the CRAN for rgdal. On Fedora use
sudo dnf install gdal-devel proj-devel
Not that proj-devel is necessary to prevent the error "configure: error: API to be used not found". After which in R you can use install.packages("rgdal"). Using the package manager is also a good solution.
Based on the instructions by dncgst, I would suggest first installing the packages libgdal-dev and libproj-dev:
sudo apt-get install gdal-bin proj-bin libgdal-dev libproj-dev
I discovered you can install the binaries directly from the package manager
sudo dnf install R-rgdal
R version 3.4.4. Ubuntu 18.04.5 LTS.
install.packages('devtools')
The output shows missing "gert", "usethis".
Then I tried to install the failed packages "gert".
install.packages('gert', repos='https://cran.rstudio.com/')
Output is an error of missing "libgit2-dev".
Next, I went to install "libgit2-dev", and failed all the time.
The reason of failure of installing "libgit2" is, one shall install the "git2r" instead. (Reference: https://github.com/libgit2/libgit2 and https://github.com/ropensci/git2r)
** Solve the "gert" below:**
install.packages('git2r') # https://github.com/ropensci/git2r\
install.packages('gert')\
below refers to: https://github.com/r-lib/gert the installation hints.
On Linux you need to install libgit2:
Debian: libgit2-dev
Fedora / CentOS: libgit2-devel
For Ubuntu Trusty and Xenial, you can use libgit2 backports from
this ppa:
sudo add-apt-repository ppa:cran/libgit2
sudo apt-get update
sudo apt-get install libgit2-dev
DONE!
After that, the package "usethis" can be installed normally.
install.packages('usethis')
DONE!
In the end, the "devtools" can also be installed normally.
install.packages('devtools')\
The error of "non-zero status" does not show up.
library(devtools)
Loading required package: usethis
Extend story:
the package tidyverse can be intalled successfully after the devtools problem got solved.
Happy end.
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.4 LTS
When I try install the package RMySQL using the following command:
install.packages('RMySQL')
I got the following error message:
/usr/bin/ld: cannot find -lssl
/usr/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
/usr/share/R/share/make/shlib.mk:6: recipe for target 'RMySQL.so' failed
make: *** [RMySQL.so] Error 1
ERROR: compilation failed for package ‘RMySQL’
* removing ‘/home/lepina/R/x86_64-pc-linux-gnu-library/3.6/RMySQL’
Warning in install.packages :
installation of package ‘RMySQL’ had non-zero exit status
I ask help because I don't know what else I might to do. I have already performed a R downgrade from 4.0.0 to 3.6.3 without success.
Following the recommendation from Dirk Eddelbuettel, and I run the following command line:
sudo apt-get install r-cran-rmysql
But I get another error message:
:~$ sudo apt-get install r-cran-rmysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
r-cran-rmysql : Depends: r-api-3.4
Depends: r-cran-dbi (>= 0.4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
So I decided to fix the broken packages, using the couple of commands:
sudo apt update --fix-missing
sudo apt install -f
And forcing the manual installation of missing package r-api-3.4, using the command:
sudo apt-get install -y r-api-3.4
But I got another error message that I don't have ideia about how to solve it:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package r-api-3.4 is a virtual package provided by:
r-base-core 3.4.4-1ubuntu1 [Not candidate version]
E: Package 'r-api-3.4' has no installation candidate
To make it visible for everybody else: Dirk's solution via terminal worked for me (Ubuntu 22.04): sudo apt-get install r-cran-rmysql
I need to install rvest package for R version 3.1.2 (2014-10-31)
I get these errors:
checking whether the C++ compiler supports the long long type... no
*** stringi cannot be built. Upgrade your C++ compiler's settings
ERROR: configuration failed for package ‘stringi’
* removing ‘/usr/local/lib64/R/library/stringi’
ERROR: dependency ‘stringi’ is not available for package ‘stringr’
* removing ‘/usr/local/lib64/R/library/stringr’
ERROR: dependency ‘stringr’ is not available for package ‘httr’
* removing ‘/usr/local/lib64/R/library/httr’
ERROR: dependency ‘stringr’ is not available for package ‘selectr’
* removing ‘/usr/local/lib64/R/library/selectr’
ERROR: dependencies ‘httr’, ‘selectr’ are not available for package ‘rvest’
* removing ‘/usr/local/lib64/R/library/rvest’
Any ideas on how I could install R package rvest?
My system is Ubuntu 14.04 with R:3.2.3, and I had the same problem.
Then I checked err meg and tried to install library of libcurl4-openssl-dev and libxml2-dev:
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install libxml2-dev
After installed, install.packages("rvest") was successful.
I needed dependencies such as Rcurl, XML, rvest, xml2, when I was trying to install tidyverse, DESeq2, RUVSeq in Rstudio Version 1.1.456 on a fresh installed Ubuntu 18.04. Anyway, there were a bunch of missing dependencies. This answer might fit better as a comment for Ubuntu 18.04, but I don't have that many reputation. So just trying to make a summary of solutions works for Ubuntu 18.04 here.
In the terminal, run:
sudo apt-get install libcurl4-openssl-dev libssl-dev
sudo apt-get install libxml2-dev
Then within Rstudio,
install.packages("xml2")
install.packages("rvest")
install.packages("tidyverse") # might need other dependencies installed in Rstudio
Got tidyverse!
In the terminal:
sudo apt-get install libmysqlclient-dev ## for RMySQL
Then within the Rstudio
source("https://bioconductor.org/biocLite.R")
biocLite("DESeq2")
biocLite('RUVSeq') ## might have messages as following
installation path not writeable, unable to update packages: cluster, foreign, MASS, Matrix, mgcv, nlme, survival
In the terminal:
sudo R ## give R the root permission
## in the R session within the terminal
pks <- c('cluster', 'foreign', 'MASS', 'Matrix', 'mgcv', 'nlme', 'survival')
install.packages(pks)
q()
That's my own experience. Hope this one has a good Generalizability.
I was able to build the stringi package as this:
install.packages('stringi', configure.args='--disable-cxx11')
My answer is definitely late to this question. Nevertheless, somebody may find it useful.
I run into the same problem so I run this command on the shell:
sudo apt-get upgrade pkg-config
It worked for me.