install daewr package in R 4.0 - r

hi i am trying to install package for experiment designs like this
install.packages("daewr", dependencies = T)
but it returns the following
configure: error: GNU MP not found, or not 4.1.4 or up, see http://gmplib.org
ERROR: configuration failed for package ‘gmp’
* removing ‘/home/yeferson/R/x86_64-pc-linux-gnu-library/4.0/gmp’
Warning in install.packages :
installation of package ‘gmp’ had non-zero exit status
ERROR: dependency ‘gmp’ is not available for package ‘partitions’
* removing ‘/home/yeferson/R/x86_64-pc-linux-gnu-library/4.0/partitions’
Warning in install.packages :
installation of package ‘partitions’ had non-zero exit status
ERROR: dependency ‘partitions’ is not available for package ‘DoE.base’
* removing ‘/home/yeferson/R/x86_64-pc-linux-gnu-library/4.0/DoE.base’
Warning in install.packages :
installation of package ‘DoE.base’ had non-zero exit status
ERROR: dependency ‘DoE.base’ is not available for package ‘FrF2’
* removing ‘/home/yeferson/R/x86_64-pc-linux-gnu-library/4.0/FrF2’
Warning in install.packages :
installation of package ‘FrF2’ had non-zero exit status
ERROR: dependency ‘FrF2’ is not available for package ‘daewr’
* removing ‘/home/yeferson/R/x86_64-pc-linux-gnu-library/4.0/daewr’
Warning in install.packages :
installation of package ‘daewr’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpB1bSe0/downloaded_packages’
so i decided to download the file from https://cran.r-project.org/web/packages/daewr/index.html
after trying to install it returns me
also installing the dependencies ‘gmp’, ‘partitions’, ‘DoE.base’, ‘FrF2.catlg128’
I try to install the first one but it asks for a Bessel package and it still gives me problems

I solved it by installing dependency one by one, many answer you install the dependencies but they do not say how I will explain them for the new ones in linux and in R to install the daerw package with the aforementioned problems, install the following in the linux console
sudo apt-get install libgsl-dev
with that install libraries now I can open R and install
install.packages('gsl')
then I opened the linux console again and installed
sudo apt-get install libgmp-dev
I go back to R and install
install.packages("gmp", dependencies = T)
now I can install the package without problems
install.packages("daewr", dependencies = T)
library(daewr)
I hope that any comment is welcome.

Related

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.

Trying to get Tidyverse installed in Linux mint 20.2

I've been working on getting RStudio to open on and off for the last few days, finally got it running and started installing packages. Readr installed fine but tidyverse refuses to install.
/usr/bin/ld: /usr/local/lib/libcrypto.a(v3_genn.o): relocation R_X86_64_PC32 against symbol `GENERAL_NAME_it' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make: *** [/usr/share/R/share/make/shlib.mk:6: openssl.so] Error 1
ERROR: compilation failed for package ‘openssl’
* removing ‘/home/william/R/x86_64-pc-linux-gnu-library/3.6/openssl’
Warning in install.packages :
installation of package ‘openssl’ had non-zero exit status
ERROR: dependency ‘openssl’ is not available for package ‘ids’
* removing ‘/home/william/R/x86_64-pc-linux-gnu-library/3.6/ids’
Warning in install.packages :
installation of package ‘ids’ had non-zero exit status
ERROR: dependency ‘openssl’ is not available for package ‘httr’
* removing ‘/home/william/R/x86_64-pc-linux-gnu-library/3.6/httr’
Warning in install.packages :
installation of package ‘httr’ had non-zero exit status
ERROR: dependency ‘httr’ is not available for package ‘gargle’
* removing ‘/home/william/R/x86_64-pc-linux-gnu-library/3.6/gargle’
Warning in install.packages :
installation of package ‘gargle’ had non-zero exit status
ERROR: dependency ‘httr’ is not available for package ‘rvest’
* removing ‘/home/william/R/x86_64-pc-linux-gnu-library/3.6/rvest’
Warning in install.packages :
installation of package ‘rvest’ had non-zero exit status
ERROR: dependencies ‘gargle’, ‘httr’ are not available for package ‘googledrive’
* removing ‘/home/william/R/x86_64-pc-linux-gnu-library/3.6/googledrive’
Warning in install.packages :
installation of package ‘googledrive’ had non-zero exit status
ERROR: dependencies ‘gargle’, ‘googledrive’, ‘httr’, ‘ids’ are not available for package ‘googlesheets4’
* removing ‘/home/william/R/x86_64-pc-linux-gnu-library/3.6/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/william/R/x86_64-pc-linux-gnu-library/3.6/tidyverse’
Warning in install.packages :
installation of package ‘tidyverse’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpyoCTNu/downloaded_packages’
To fix this I've tried suggestions from two places:
The first option was 'sudo apt install libcurl4-openssl-dev libssl-dev libxml2-dev'
from this website: https://blog.zenggyu.com/en/post/2018-01-29/installing-r-r-packages-e-g-tidyverse-and-rstudio-on-ubuntu-linux/
The second this was 'sudo apt-get install r-base-dev xml2 libxml2-dev libssl-dev libcurl4-openssl-dev unixodbc-dev'
from the rstudio community page: https://community.rstudio.com/t/cant-install-tidyverse/29293
A third option I found that is too advanced for me without guidance is this:
If openssl is already installed, check that 'pkg-config' is in your PATH and
PKG_CONFIG_PATH contains a openssl.pc file. If pkg-config is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
I'm sure I'm doing something wrong. I think something may not be in the proper place or is linked to the wrong location. Any assistance would be greatly appreciated.
(Also,for reference, this is the first time I've used linux so please dumb answers down as much as possible)
I've now gotten this to work. By looking at the error messages I found the dependencies that need to be installed before tidyverse can be installed (and function).
It is preferable but not necessary to get the latest version of R installed. I followed the steps in this tutorial:
https://linuxconfig.org/how-to-install-rstudio-on-ubuntu-20-04-focal-fossa-linux
In the interest of putting everything in one place, I'll put the steps here:
Step 1:
$ sudo apt update
$ sudo apt -y install r-base gdebi-core
Step 2: Install Rstudio from their website
Step 3: For this step, make sure you're in the folder that has the file downloaded, for me that was in downloads
$ sudo gdebi rstudio-1.2.5019-amd64.deb
Step 4: Open Rstudio
To get tidyverse to work, my error messages were all about non-zero exit statuses. What I did was to go through, find the packages that weren't properly installing, and manually install them.
My first problem was with curl. I tried installing it in Rstudio first. When I got an error, I went into terminal and installed it with
sudo apt-get install libcurl4-openssl-dev
If openssl refuses to install try:
sudo apt-get install libssl-dev
I tried installing tidyverse again, no dice. It was still having trouble with xml2 and rvest. I installed xml2 in terminal with.
sudo apt-get install libxml2-dev
After that, rvest installed using Rstudio and tidyverse installed successfully.
These instructions work with both R 4.1.1 and R 3.4.4
It would seem that the R version here is quite old, version 3.6. A bunch of things that are tidyverse related broke around the switch from 3.* to 4.*.
If you follow a procedure like this, it should get you started on the right path with the proper R version and the rest will likely fall into place.
https://linuxize.com/post/how-to-install-r-on-ubuntu-20-04/
Occasionally, on linux machines, you will have packages that fail to install because of system level dependencies that are missing. Those messages are usually informative; they will tell you what you need and the command for acquiring it.

How to fix 'libproj not found in standard or given locations' error in r

I'm trying to install the 'agricolae' package on R, but I get an error saying
configure: error: libproj not found in standard or given locations.
ERROR: configuration failed for package ‘sf’
* removing ‘/R/x86_64-pc-linux-gnu-library/3.6/sf’
Warning in install.packages :
installation of package ‘sf’ had non-zero exit status
ERROR: dependency ‘sf’ is not available for package ‘spdep’
* removing ‘/R/x86_64-pc-linux-gnu-library/3.6/spdep’
Warning in install.packages :
installation of package ‘spdep’ had non-zero exit status
ERROR: dependency ‘spdep’ is not available for package ‘agricolae’
* removing ‘/R/x86_64-pc-linux-gnu-library/3.6/agricolae’
Warning in install.packages :
installation of package ‘agricolae’ had non-zero exit status
I recently upgraded to Ubuntu 18.04.2 and R version 3.6.0 (2019-04-26) -- "Planting of a Tree" and that's when the problems started.
When I do
$ sudo apt-get install -y libproj-dev
I get:
libproj-dev is already the newest version (5.2.0-1~bionic0).
The error says that package 'sf' is not available for dependency 'spdep'. So you should be attempting to install pkg 'sf'. (I'm on the same OS as you and pkg:agricolae installed without problem just now. I have a more complete set of spatial R and system packages than you do.)
Edit: There have been reports that it was necessary in addressing this problem to create an environment link to the location of your libraries:
$ export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib
(From: https://stat.ethz.ch/pipermail/r-sig-geo/2018-August/026740.html which in turn linked to https://gis.stackexchange.com/questions/157059/repairing-broken-gdal-and-proj-4-on-ubuntu, which has so further debugging options mentioned.)

Installation of archived package "prob" not working in R

I'm running R 3.4.2 and R Studio 1.0.153. I want to install the prob package in R. The prob package in an archived file. It is located here. I am trying to install the prob_1.0-0.tar.gz package. I have no problem downloading and opening the package archive file. The code is below, it seems I need to install the fAsianOptions package.
ERROR: dependency 'fAsianOptions' is not available for package 'prob'
* removing 'C:/Users/blake_000/Documents/R/win-library/3.4/prob' Warning in install.packages : running command
'"C:/PROGRA~1/R/R-34~1.2/bin/x64/R" CMD INSTALL -l
"C:\Users\blake_000\Documents\R\win-library\3.4"
"C:/Users/BLAKE_~1/GOOGLE~1/Life/CSUEB/FALL20~1/6204-P~1/RCODE~1/prob_1.0-0.tar.gz"'
had status 1 Warning in install.packages : installation of package
‘C:/Users/BLAKE_~1/GOOGLE~1/Life/CSUEB/FALL20~1/6204-P~1/RCODE~1/prob_1.0-0.tar.gz’
had non-zero exit status
Unfortunately, the fAsianOptions package is also archived. It is located here and I downloaded version fAsianOptions_3010.79.tar.gz. There were a number of dependencies but I installed the required packages (timeDate, timeSeries, etc.)
However, the fAsianOptions package is not installing. The error code reads as follows:
install.packages("C:/Users/blake_000/Google Drive/Life/CSUEB/Fall
2017/6204- Probability/R Code/fAsianOptions_3010.79.tar.gz", repos =
NULL, type = "source") Installing package into
‘C:/Users/blake_000/Documents/R/win-library/3.4’ (as ‘lib’ is
unspecified)
* installing source package 'fAsianOptions' ...
** package 'fAsianOptions' successfully unpacked and MD5 sums checked
** libs
*** arch - i386 Warning: running command 'make -f "Makevars" -f "C:/PROGRA~1/R/R-34~1.2/etc/i386/Makeconf" -f
"C:/PROGRA~1/R/R-34~1.2/share/make/winshlib.mk"
SHLIB="fAsianOptions.dll" SHLIB_LIBADD='$(FLIBS)'
OBJECTS="EBMAsianOptions.o GammaFunctions.o
HypergeometricFunctions.o"' had status 127 ERROR: compilation failed
for package 'fAsianOptions'
* removing 'C:/Users/blake_000/Documents/R/win-library/3.4/fAsianOptions' Warning
in install.packages : running command
'"C:/PROGRA~1/R/R-34~1.2/bin/x64/R" CMD INSTALL -l
"C:\Users\blake_000\Documents\R\win-library\3.4"
"C:/Users/BLAKE_~1/GOOGLE~1/Life/CSUEB/FALL20~1/6204-P~1/RCODE~1/fAsianOptions_3010.79.tar.gz"'
had status 1 Warning in install.packages : installation of package
‘C:/Users/BLAKE_~1/GOOGLE~1/Life/CSUEB/FALL20~1/6204-P~1/RCODE~1/fAsianOptions_3010.79.tar.gz’
had non-zero exit status
I'm hoping that someone can help me to install the fAsianOptions dependency so I can install the prob package. Or, if there's an easier way, please let me know!
I had the same problem. I solved it by installing lower version of R -2.9. prob is available in repository for this version.

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