Reputation: 2026
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’
Upvotes: 3
Views: 12074
Reputation: 1
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
Upvotes: 0
Reputation: 41
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.
Upvotes: 0
Reputation: 81
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.
Upvotes: 6
Reputation: 1404
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')
Upvotes: 4