R: Error when installing package "gifski" - r

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 ?

Related

Unable to install package RGLPK with R Studio Server in AWS

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

Error when trying to install vcfR in Rstudio

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.

Cannot install R-package gdtools or ggiraph in conda after upgrading to OS X Catalina

After upgrading to OS X Catalina and re-installing R (since OS X now have completely migrated to 64-bit), I cannot install the packages ggiraph or gdtools. I have managed to install other packages such as ggplot2 without problem, but these doesn't work for some reason. I am hoping that someone here can help me out.
If I try to install it in R from GitHub I get:
devtools::install_github('davidgohel/ggiraph')
Pop-up:
"Install Build Tools
Building R package from source requires installation of additional build tools.
Do you want to install the additional tools now?"
But I have already install Xcode, so I don't know why I get this...
If I try to install it from CRAN I get:
install.packages("ggiraph")
also installing the dependencies ‘systemfonts’, ‘gdtools’, ‘uuid’
trying URL 'https://cran.rstudio.com/src/contrib/systemfonts_0.1.1.tar.gz'
Content type 'application/x-gzip' length 24379 bytes (23 KB)
==================================================
downloaded 23 KB
trying URL 'https://cran.rstudio.com/src/contrib/gdtools_0.2.1.tar.gz'
Content type 'application/x-gzip' length 32043 bytes (31 KB)
==================================================
downloaded 31 KB
trying URL 'https://cran.rstudio.com/src/contrib/uuid_0.1-2.tar.gz'
Content type 'application/x-gzip' length 46706 bytes (45 KB)
==================================================
downloaded 45 KB
trying URL 'https://cran.rstudio.com/src/contrib/ggiraph_0.7.0.tar.gz'
Content type 'application/x-gzip' length 372907 bytes (364 KB)
==================================================
downloaded 364 KB
installing source package ‘systemfonts’ ...
package ‘systemfonts’ successfully unpacked and MD5 sums checked
using staged installation
Using PKG_CFLAGS=
Using PKG_LIBS=-lfreetype
./configure: line 54: x86_64-apple-darwin13.4.0-clang: command not found
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because freetype2 was not found. Try installing:
deb: libfontconfig1-dev (Debian, Ubuntu, etc)
rpm: fontconfig-devel (Fedora, EPEL)
csw: fontconfig_dev (Solaris)
brew: freetype (OSX)
If freetype2 is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a freetype2.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=...'
ERROR: configuration failed for package ‘systemfonts’
* removing ‘/Users/USER/Anaconda3/anaconda3/lib/R/library/systemfonts’
Warning in install.packages :
installation of package ‘systemfonts’ had non-zero exit status
* installing source package ‘uuid’ ...
* package ‘uuid’ successfully unpacked and MD5 sums checked
* using staged installation
checking for gcc... x86_64-apple-darwin13.4.0-clang
checking whether the C compiler works... no
configure: error: in /private/var/folders/fy/d14lc6rd5nq827m06zkkb1_h0000gn/T/RtmpQUHJ12/R.INSTALL29ed73b7d534/uuid':
configure: error: C compiler cannot create executables
Seeconfig.log' for more details
ERROR: configuration failed for package ‘uuid’
* removing ‘/Users/USER/Anaconda3/anaconda3/lib/R/library/uuid’
Warning in install.packages :
installation of package ‘uuid’ had non-zero exit status
ERROR: dependency ‘systemfonts’ is not available for package ‘gdtools’
* removing ‘/Users/USER/Anaconda3/anaconda3/lib/R/library/gdtools’
Warning in install.packages :
installation of package ‘gdtools’ had non-zero exit status
ERROR: dependencies ‘gdtools’, ‘uuid’ are not available for package ‘ggiraph’
* removing ‘/Users/USER/Anaconda3/anaconda3/lib/R/library/ggiraph’
Warning in install.packages :
installation of package ‘ggiraph’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/fy/d14lc6rd5nq827m06zkkb1_h0000gn/T/RtmpKdtLil/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
If I try to install it from Terminal I get:
conda install -c conda-forge r-ggiraph
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
Examining backports.functools_lru_cache: 14%|▏| 87/641 [00:00<00:00, 1400.70it/
Examining bcrypt: 14%|███ | 88/641 [00:00<00:00, 1403.40it/s]
Examining sphinxcontrib-serializinghtml: 17%|▏| 106/641 [00:00<00:00, 1307.92it
Examining nss: 17%|████ | 107/641 [00:00<00:00, 1310.62it/s]
Examining clangdev: 22%|████▎ | 144/641 [00:00<00:00, 1233.48it/s]
/ mparing specs that have this dependenc-...**
... and the list of conflicts goes on and on and on...
Any ideas?

How install Rsymphony in Mac OS X 10.14

I have seen a lot of solutions to this problem before, but they can't solve it.
> install.packages("Rsymphony")
Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘Rsymphony’
Do you want to attempt to install these from sources? (Yes/no/cancel) y
installing the source package ‘Rsymphony’
试开URL’https://cran.rstudio.com/src/contrib/Rsymphony_0.1-28.tar.gz'
Content type 'application/x-gzip' length 8631 bytes
==================================================
downloaded 8631 bytes
* installing *source* package ‘Rsymphony’ ...
** 成功将‘Rsymphony’程序包解包并MD5和检查
Cannot find SYMPHONY libraries and headers.
See <https://projects.coin-or.org/SYMPHONY>.
ERROR: configuration failed for package ‘Rsymphony’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rsymphony’
Warning in install.packages :
installation of package ‘Rsymphony’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/b0/n64bqfyn5y9dr3t427tljzv40000gn/T/RtmptYuOGn/downloaded_packages’
Before
brew install symphony
And Modify file R_symphony.cc & configure.
But there is still no change in this issue.
I know “SystemRequirements: SYMPHONY libraries and headers”,But I don't know how to solve it.

how to install r package for oracle on windows 10 64 bit

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 :-)

Resources