I'm having trouble installing the vcfR package in R studio.
I'm on Ubuntu 18.04.4 LTS in Rstudio and my R version 3.6.3
When I try to install using:
install.packages('vcfR')
I get a non-zero exit status
Installing package into ‘/home/username/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'http://cran.r-project.org/src/contrib/vcfR_1.11.0.tar.gz'
Content type 'application/x-gzip' length 1453180 bytes (1.4 MB)
==================================================
downloaded 1.4 MB
* installing *source* package ‘vcfR’ ...
** package ‘vcfR’ successfully unpacked and MD5 sums checked
** using staged installation
./configure: 4: ./configure: checkbashisms: not found
Warning in system(cmd) : error in running command
ERROR: configuration failed for package ‘vcfR’
* removing ‘/home/username/x86_64-pc-linux-gnu-library/3.6/vcfR’
Warning in install.packages :
installation of package ‘vcfR’ had non-zero exit status
I'm not really sure where to go from here or what to try to fix it.
This would appear to be due to a simple bug in the package vcfR. In the most recent version its configure script consists of
#!/bin/sh
#
checkbashisms --force
# EOF.
which makes little to no sense. CRAN never noticed because they now have the script checkbashishm (from Debian's devscript package) installed. Someone should tell the maintainer of vcfR to correct this. I'll send him a mail. At a minimum it should change to
if [ -f /usr/bin/checkbashisms ]; then
checkbashisms --force
fi
I found this on github, so apparently it is a general issue:
https://github.com/r-hub/rhub-linux-builders/issues/46
I'm also running Ubuntu 18.04.04, and got the same error message as you. I installed the devscripts package through the terminal using the following code:
sudo apt update
sudo apt install devscripts
I was then able to successfully install vcfR in RStudio.
Related
I hope you're staying well. I am trying to install the gifski package so that I can run tmap_animation().
Here's the error message I see:
Installing package into ‘/nfs/cfs/home4/wmjl/wmjlwuh/R/x86_64-pc-linux-gnu-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/gifski_1.4.3.tar.gz'
Content type 'application/x-gzip' length 12729 bytes (12 KB)
==================================================
downloaded 12 KB
* installing *source* package ‘gifski’ ...
** package ‘gifski’ successfully unpacked and MD5 sums checked
** using staged installation
./configure: line 5: cargo: command not found
------------------ 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 rust (MacOS)
Alternatively install Rust from: <https://www.rust-lang.org>
---------------------------------------------------------------
ERROR: configuration failed for package ‘gifski’
* removing ‘/nfs/cfs/home4/wmjl/wmjlwuh/R/x86_64-pc-linux-gnu-library/4.0/gifski’
Warning in install.packages :
installation of package ‘gifski’ had non-zero exit status
I've tried following the instructions above (namely, installing rust on MacOS) without any success.
Can anyone provide any guidance on this issue?
Thank you so much,
Yaning
Did you follow each step on this website ??
You should probably also do the change in the PATH as said in the chapter:
Configuring the PATH environment variable
Can you provide more information of what you have done please ?
I am trying to install the package RGLPK with an AWS EC2 instance which has R Studio 1.3 and R 4.0 running. I get this result:
> install.packages("Rglpk")
Installing package into ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/Rglpk_0.6-4.tar.gz'
Content type 'application/x-gzip' length 21753 bytes (21 KB)
==================================================
downloaded 21 KB
* installing *source* package ‘Rglpk’ ...
** package ‘Rglpk’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
/bin/bash: line 0: cd: GLPK: No such file or directory
Makevars:10: recipe for target 'GLPK.ts' failed
make: *** [GLPK.ts] Error 1
ERROR: compilation failed for package ‘Rglpk’
* removing ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/4.0/Rglpk’
Warning in install.packages :
installation of package ‘Rglpk’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpHmQk09/downloaded_packages’
I have found numerous similar errors involving this package. Such as this:
GLPK: No such file or directory error when trying to install R package
There seems to be 3 or 4 solutions, but they involve sudo commands from the terminal window. I am in a virtual machine.
This worked:
In the terminal within R Studio Server:
sudo apt install libglpk-dev
And back in the console, install the R library:
install.packages("Rglpk")
Credit: #AdamErickson from this post:
GLPK: No such file or directory error when trying to install R package
while installing rpackage Roracle on windows 10 i'm getting stuck at this point
install.packages("ROracle")
Installing package into ‘C:/Users/admin/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
Package which is only available in source form, and may need compilation of C/C++/Fortran:
‘ROracle’
Do you want to attempt to install these from sources?
y/n: y
installing the source package ‘ROracle’
trying URL 'https://cran.rstudio.com/src/contrib/ROracle_1.3-1.tar.gz'
Content type 'application/x-gzip' length 308252 bytes (301 KB)
downloaded 301 KB
* installing *source* package 'ROracle' ...
** package 'ROracle' successfully unpacked and MD5 sums checked
ERROR: cannot find Oracle Client.
Please set OCI_LIB64 to specify its location.
Warning: running command 'sh ./configure.win' had status 1
ERROR: configuration failed for package 'ROracle'
* removing 'C:/Users/admin/Documents/R/win-library/3.3/ROracle'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\admin\Documents\R\win-library\3.3" C:\Users\admin\AppData\Local\Temp\RtmpGYlz5L/downloaded_packages/ROracle_1.3-1.tar.gz' had status 1
Warning in install.packages :
installation of package ‘ROracle’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\admin\AppData\Local\Temp\RtmpGYlz5L\downloaded_packages’
I've installed Rtools Rtools33.exe and my R version is version.string R version 3.3.2 (2016-10-31)
please help to connect it with oracle 11g database
Oracle client is intalled in d drive which path is:
D:\app\admin\product\11.2.0\client_1\BIN
As #Nathan Dobie mentionned, instructions on the ROracle installation were helpful for me. I didn't need Rtools.exe but i had to add oracle instant client in the Environment variables.
Configuration in 64bits:
Under System variables, create OCI_LIB64 if it does not already exist.
Set the value of OCI_LIB64 to D:\app\admin\product\11.2.0\client_1\BIN (in your case)
Under System variables, edit PATH to include
D:\app\admin\product\11.2.0\client_1\BIN
And you will also need to create OCI_INC with the following value
D:\app\admin\product\11.2.0\client_1\oci\include
Worked very well for me :-)
I recently installed the forecast package, using install.packages().
The latest version (6.1) has been successfully installed but I want to install the forecast package version 5.9. So I used :
install.packages('http://cran.rstudio.com/src/contrib/Archive/forecast/forecast_5.9.tar.gz', repos=NULL, type='source')
But when using library I get an error:
install.packages('http://cran.rstudio.com/src/contrib/Archive/forecast/forecast_5.9.tar.gz', repos=NULL, type='source')
Installing package into ‘C:/Users/.../Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/Archive/forecast/forecast_5.9.tar.gz'
Content type 'application/x-gzip' length 156982 bytes (153 KB)
downloaded 153 KB
* installing *source* package 'forecast' ...
** package 'forecast' successfully unpacked and MD5 sums checked
** libs
*** arch - i386
Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-32~1.1/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-32~1.1/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="forecast.dll" OBJECTS="calcBATS.o calcTBATS.o etsTargetFunction.o etsTargetFunctionWrapper.o etscalc.o etspolyroot.o makeBATSMatrices.o makeTBATSMatrices.o updateMatrices.o updateTBATSMatrices.o"' had status 127
ERROR: compilation failed for package 'forecast'
* removing 'C:/Users/.../Documents/R/win-library/3.2/forecast'
* restoring previous 'C:/Users/.../Documents/R/win-library/3.2/forecast'
Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
problem copying C:\Users\...\Documents\R\win-library\3.2\00LOCK-forecast\forecast\libs\x64\forecast.dll to C:\Users\...\Documents\R\win-library\3.2\forecast\libs\x64\forecast.dll: Permission denied
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\...\Documents\R\win-library\3.2" "C:/Users/.../AppData/Local/Temp/RtmpQzO3Zp/downloaded_packages/forecast_5.9.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘C:/Users/.../AppData/Local/Temp/RtmpQzO3Zp/downloaded_packages/forecast_5.9.tar.gz’ had non-zero exit status
Here is the way to install forecast version 5.9(Its not a problem if you have forecast 6.1 already installed,it would install 5.9 separately meaning that you would see two forecast packages in the installed packages ).
Go to the link https://cran.r-project.org/src/contrib/Archive/forecast/
Download forecast 5.9(just click on it,it would start downloading the file.
Now open the R studio,click on install packages and change install from to : Package archive File(and just browse it to the location of zip file).And your package would be installed.
While using the forecast package in my case it didnt work(the function that uses forecast package) when both the forecast package where loaded.So i use forecast 5.9 making sure that 6.1 isnt loaded.
Hope that helps
I have updated R and get problems when I want to run old scripts. Specifically, one of the packages I use has been removed from CRAN and I get the following error message when I try to load the installed package (installed from a binary file of the latest version of the package without any problem. As you can see, the package in question is the ACER package):
Failed with error: ‘package ‘acer’ was built before R 3.0.0: please re-install it’
Is it possible to recompile the source file to get binary files that work on R > 3.0.0?? This package worked fine on previous version R 3.0.1, but not on R 3.1.1. Is there any way I can get this package correctly loaded on R 3.1.1 (using either the source file or the file compiled for R 3.0.1?
I already tried to install from source, but it doesn't work. I get this error messages, which don't make too much sense to me. Is there an easy way out of this?
> install.packages(pkgs="acer_0.1.2.tar.gz", type="source", repos=NULL)
Installing package into ‘C:/Users/user/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
* installing *source* package 'acer' ...
** package 'acer' successfully unpacked and MD5 sums checked
** libs
*** arch - i386
Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-31~1.1/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-31~1.1/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="acer.dll" OBJECTS="estimate_acer.o peaks.o"' had status 127
ERROR: compilation failed for package 'acer'
* removing 'C:/Users/user/Documents/R/win-library/3.1/acer'
* restoring previous 'C:/Users/user/Documents/R/win-library/3.1/acer'
Warning messages:
1: running command '"C:/PROGRA~1/R/R-31~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\user\Documents\R\win-library\3.1" "acer_0.1.2.tar.gz"' had status 1
2: In install.packages(pkgs = "acer_0.1.2.tar.gz", type = "source", :
installation of package ‘acer_0.1.2.tar.gz’ had non-zero exit status
I also tried installing it from the command line but get similar errors. Can anyone help?
Do you have Rcpp installed and on your path?
I think error code 127 on make means that the program couldn't be found in your $PATH and the only dependency of acer seems to be Rcpp.
Hope this helps
-A