I'm having trouble installing the lme4 package from CRAN on Ubuntu 18.04. I'm running install.packages("lme4") on R 3.4.4 and get the following error:
ERROR: configuration failed for package ‘nloptr’
* removing ‘/home/peter/R/x86_64-pc-linux-gnu-library/3.4/nloptr’
ERROR: dependency ‘nloptr’ is not available for package ‘lme4’
* removing ‘/home/peter/R/x86_64-pc-linux-gnu-library/3.4/lme4’
Looking more closely, I see these two error lines:
libtool: link: ERROR: no information for variable 'AR' cru .libs/libutil.a .libs/mt19937ar.o .libs/sobolseq.o .libs/timer.o .libs/stop.o .libs/redblack.o .libs/qsort_r.o .libs/rescale.o
checking for ranlib... ERROR: no information for variable 'RANLIB'
However, both ar and ranlib commands work on my machine. What may be the cause of the errors?
You just need to install the older version of nloptr package.
For example:
packageurl<-"https://cran.r-project.org/src/contrib/Archive/nloptr/nloptr_1.2.1.tar.gz"
install.packages(packageurl, repos=NULL, type="source")
I guess you are using R 3.X. Such error is caused by package update for supporting R 4.0.
Finally I found the answer for that. I was struggling with the installation of the ggpubr packages in a Ubuntu 18.04. This answer resolve the dependencies problem.
Related
I'm trying to install the package georob, which is no longer on CRAN. In order to install georob, I need first to install the package RandomFields which is no longer on CRAN neither. Therefore, I downloaded the file RandomFields_3.3.tar.gz from CRAN Archive and then tried to install the package RandomFields with the following command in R:
install.packages(pkgs = "C:/documents/RandomFields_3.3.tar.gz", type="source", repos=NULL)
When I do this I get the following error:
make: *** [C:/PROGRA~1/R/R-42~1.0/etc/x64/Makeconf:257: brownresnick.o] Error 1
ERROR: compilation failed for package 'RandomFields'
My installations are as follows:
Windows 10 Home, 64-bit
R version 4.2.0
R Studio 2022.07.2+576
Rtools42 for windows
Any idea how I can install georob and/or RandomFields?
Thank you very much!
I would like to install the expss package but it keeps returning an error.
Looked around for other with similar problems and tried re-installing several packages but nothing seems to work. Does anyone have a suggestion how to fixed the problem?
So far i tried re-installing:
install.packages("stringr")
install.packages("knitr")
install.packages("checkmate")
install.packages("htmlwidgets")
install.packages("htmltools")
install.packages("htmlTable")
install.packages("expss")
But Rstudio keeps returning with and error :
Error: package or namespace load failed for ‘expss’:
object 'mtfrm' not found whilst loading namespace 'expss'
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/expss’
Warning in install.packages :
installation of package ‘expss’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/cl/5_wnd4b14y7b40zc80n1r3wdkcnbkn/T/RtmpdcLWsn/downloaded_packages’
According to this issue, the current version of expss won't install in versions of R before 4.2. This has recently been fixed in the development version. You could try:
updating your version of R to version 4.2 (probably the simplest solution if you don't need to keep an older version of R)
installing the development version of expss from GitHub: first install the remotes package, then remotes::install_github("gdemin/expss")
install an older version of expss (remotes::install_version("expss", "0.11.1"))
I'm currently operating in macOS with the R version of 3.6.3.
When I tried to install the package ggm, a warning occurred as follows.
Warning in install.packages :
dependency ‘graph’ is not available
also installing the dependency ‘igraph’
Then when it completed installing, it seemed not to work either:
ERROR: compilation failed for package ‘igraph’
* removing ‘/usr/local/lib/R/3.6/site-library/igraph’
ERROR: dependencies ‘igraph’, ‘graph’ are not available for package ‘ggm’
* removing ‘/usr/local/lib/R/3.6/site-library/ggm’
What is happening? I have searched for this error and didn't find anything that helps. Please help me. I'll be much appreciated!
I had the same problem.
To install the package graph you need to install the latest version of Bioconductor (i.e. package called BioManager).
Then you install the package graph and then simply run the installation for the ggm package.
install.packages("BiocManager")
BiocManager::install("graph")
install.packages("ggm")
library(ggm)
The package is then loaded into your R enviroment.
I am getting this errors trying to install caret package:
ERROR: compilation failed for package ‘ddalpha’
* removing ‘/home/rspark/R/x86_64-redhat-linux-gnu-library/3.3/ddalpha’
Warning in install.packages :
installation of package ‘ddalpha’ had non-zero exit status
ERROR: dependency ‘ddalpha’ is not available for package ‘recipes’
* removing ‘/home/rspark/R/x86_64-redhat-linux-gnu-library/3.3/recipes’
Warning in install.packages :
installation of package ‘recipes’ had non-zero exit status
ERROR: dependency ‘recipes’ is not available for package ‘caret’
* removing ‘/home/rspark/R/x86_64-redhat-linux-gnu-library/3.3/caret’
Warning in install.packages :
installation of package ‘caret’ had non-zero exit status
Any ideas?
install.packages("ddalpha")
It gives the same error:
/usr/lib64/R/library/BH/include/boost/exception/exception.hpp:137: error: expected declaration before end of line
make: *** [AlphaProcedure.o] Error 1
ERROR: compilation failed for package ‘ddalpha’
* removing ‘/home/rspark/R/x86_64-redhat-linux-gnu-library/3.3/ddalpha’
I have found a solution.
I had the same problem. After installing caret with all its dependencies, ddalpha was not installed. Then I tried installing the package ddalpha alone. I got the message:
" There is a binary version available but the source version is later:
binary source needs_compilation
ddalpha 1.2.1 1.3.1 TRUE
Do you want to install from sources the package which needs compilation?
y/n: n"
Well, if I anwser yes, it doesn't work. But when I answer no, it does work. It looks like the new version has some problem, but the previous one works fine.
As Roman indicated in the comments, ddalpha and recipes are dependencies that aren't installed yet. You can manually install them as follows:
install.packages(c('ddalpha', 'recipes'))
Alternatively, you can tell the install.packages() command to grab the necessary packages during the install process.
install.packages('caret', dependencies=TRUE)
Or list them explicitly:
install.packages('caret', dependencies=c('ddalpha', 'recipes'))
Or, if you use an IDE such as RStudio, the package manager that's included will automatically handle these dependencies for you.
If these suggestions don't solve the problem, you may try updating your instance of R to the latest (3.4.1 as I write this). Also, ddalpha is dependent on the Rcpp package version 0.11.0 or greater, so you may update that package.
update.packages('Rcpp')
I was facing the same issues, and I had tried almost all the methods mentioned here. But the only one that worked for me was updating my IDE and that sorted it out.
I had the same issue, running
install.packages('caret', dependencies=TRUE)
from console solved it. I don't know why at the packages window install with "install dependencies" checked didn't work..
R studio: 2022.07.1
R: 3.6.3
I tried the following code for installation
>install.packages("forecast")
The error occurs like:
ERROR: dependency ‘Rcpp’ is not available for package ‘RcppArmadillo’
* removing ‘/root/R/x86_64-pc-linux-gnu-library/2.14/RcppArmadillo’
ERROR: dependencies ‘Rcpp’, ‘RcppArmadillo’ are not available for package ‘forecast’
* removing ‘/root/R/x86_64-pc-linux-gnu-library/2.14/forecast’
The downloaded packages are in
‘/tmp/RtmpJqQfrh/downloaded_packages’
Warning messages:
1: In install.packages("forecast") :
installation of package ‘RcppArmadillo’ had non-zero exit status
2: In install.packages("forecast") :
installation of package ‘forecast’ had non-zero exit status
Your R version is too old for the current versions of the packages which forecast depends upon.
You can try manually installing an older version of the forecast package by downloading from its Archive/ section on CRAN. A good bet would a version of about the same age as your R installation.
If you upgrade R to a current version, the Rcpp, RcppArmadillo, ... all install fine, and so will the newest version of forecast. As you are on Ubuntu, it is actually extremely easy to get these newer version, just read the README here and add the apt repository information as described.
I resolved my problem as:
First of all I have add the my CRAN to the /etc/apt/sources.list. After that I executed the following command from my terminal
sudo apt-get update
and then
sudo apt-get upgrade
Once the upgradation done successful the in R console give the command
install.packages("forecast")
This has resolved my problem. For details information regarding this you can visit cran.r-project.org/bin/linux/ubuntu.
And I thanks to Dirk Eddelbuettel for his kind suggestions.
If updating CRAN doesn't work, you might be missing gcc-fortran. This is needed for quadprog, which is needed for timeseries which in turn is needed for the CRAN forecast package.
To install the gcc-fortran package on Arch Linux, execute:
# pacman -S gcc-fortran
To install the fortran compiler on Ubuntu, execute:
# apt-get install gfortran