Install ggplot2 on opensuse 11.4 - r

I'm trying to install ggplot2, however I get the following error:
trying URL
'http://cran.skazkaforyou.com/src/contrib/ggplot2_0.8.9.tar.gz'
Content type 'application/x-gzip' length 2074749 bytes (2.0 Mb) opened
URL
================================================== downloaded 2.0 Mb
* installing source package ‘plyr’ ...
** libs
sh: make: command not found
ERROR: compilation failed for package ‘plyr’
* removing
‘/home/jayron/R/x86_64-unknown-linux-gnu-library/2.12/plyr’
* installing source package ‘digest’ ...
** libs sh: make: command not found
sh: make: command not found ERROR: compilation failed for package
‘colorspace’
ERROR: dependencies ‘reshape’, ‘plyr’, ‘digest’, ‘colorspace’ are not
available for package ‘ggplot2’
* removing ‘/home/jayron/R/x86_64-unknown-linux-gnu-library/2.12/ggplot2’
The downloaded packages are in
‘/tmp/Rtmp0Sgoxp/downloaded_packages’
any help please?

Try the following code:
install.packages("ggplot2", repos = "http://cran.r-project.org")

You need development packages. Unless someone has packaged a recent Ggplot2 for opensuse, you will need to install these using (I think) zypper. The error message says you do not have 'make' on your system. It is likely that there will be more.

You need development packages. Until someone has packaged a recent ggplot2 for opensuse, which has not yet happened yet today (Jan 2014), you will need to be root to install these using zypper:
# zypper install r-base-devel
This package exists since opensuse 11.3.
The error message says you do not have 'make' on your system. If you only install 'make', it is likely that there will be more similiar errors. Thus you need to install all development tools needed for ggplot2. This can be done by root with
# zypper install -t pattern devel_C_C++

Related

R: Error when installing package "gifski"

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 ?

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.

Installing ROracle (and the Oracle Instant Client?) on MacOS

I'm trying to install ROracle. Since ROracle requires the Oracle OCI libraries, I downloaded these files from the Oracle website: instantclient-basic-macos.x64-12.2.0.1.0, instantclient-sdk-macos.x64-12.2.0.1.0.zip. I put those files in ~/Library/Caches/Homebrew and install them using homebrew.
brew install instantclient-basic
brew install instantclient-sdk
The Oracle website also mentioned the need to set some environment variables, so I put this in my .bashrc file:
export LD_LIBRARY_PATH=/usr/local/Cellar/instantclient-basiclite/12.2.0.1.0/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=/usr/local/Cellar/instantclient-basiclite/12.2.0.1.0/lib:$DYLD_LIBRARY_PATH
export NLS_LANG=UTF8
But trying to install ROracle in R leads to this:
> install.packages("ROracle")
Installing package into ‘/usr/local/lib/R/3.4/site-library’
(as ‘lib’ is unspecified)
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
Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
unknown timezone 'zone/tz/2017c.1.0/zoneinfo/America/Los_Angeles'
* installing *source* package ‘ROracle’ ...
** package ‘ROracle’ successfully unpacked and MD5 sums checked
configure: error: OCI libraries not found
ERROR: configuration failed for package ‘ROracle’
* removing ‘/usr/local/lib/R/3.4/site-library/ROracle’
Warning in install.packages :
installation of package ‘ROracle’ had non-zero exit status
R says it can't find the OCI libraries. Oracle's documentation has so far proven non-existent or worthless in resolving this issue, but I found a comment on the internet that seemed promising. So I wrote this into my .bashrc and ran it:
R CMD INSTALL --configure-args='--with-oci-lib=/usr/local/Cellar/instantclient-basic/12.2.0.1.0/lib --with-oci-inc=/usr/local/Cellar/instantclient-sdk/12.2.0.1.0/lib/sdk/include' ROracle_1.3-1.tar.gz
With this result:
installing to /usr/local/lib/R/3.4/site-library/ROracle/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error: package or namespace load failed for ‘ROracle’ in dyn.load(file, DLLpath = DLLpath, ...):
****unable to load shared object '/usr/local/lib/R/3.4/site-
library/ROracle/libs/ROracle.so':
dlopen(/usr/local/lib/R/3.4/site-library/ROracle/libs/ROracle.so, 6): Symbol
not found: _ons_recvthread_clone_sb
Referenced from: /usr/local/Cellar/instantclient-basic/12.2.0.1.0/lib/libons.dylib
Expected in: flat namespace
in /usr/local/Cellar/instantclient-basic/12.2.0.1.0/lib/libons.dylib
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/usr/local/lib/R/3.4/site-library/ROracle’
So there's something wrong with libons.dylib? What am I supposed to do with that information?
The Instant Client 12.2 for macOS was patched. Get it from http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html and unzip it, for example into ~/instantclient_12_2
I was able to install ROracle on macOS with:
brew install R
Update rpath in the library (using the correct version number for R):
install_name_tool -add_rpath ~/instantclient_12_2 /usr/local/Cellar/r/3.4.3/lib/R/bin/exec/R
Run 'R' and then:
install.packages("DBI")
Download ROracle_1.3-1.tar.gz from https://cran.r-project.org/web/packages/ROracle/index.html and install it:
R CMD INSTALL --configure-args='--with-oci-lib=/Users/cjones/instantclient_12_2 --with-oci-inc=/Users/cjones/instantclient_12_2/sdk/include' ROracle_1.3-1.tar.gz
A solution for that without -add_rpath can be found on Intall ROracle Package for Windows and Mac OS
I use R from Macports and I did:
cd /opt/local/Library/Frameworks/R.framework/Resources/lib
sudo ln -s ~/Applications/instantclient/libclntsh.dylib.12.1
sudo ln -s ~/Applications/instantclient/libclntshcore.dylib.12.1
sudo ln -s libclntsh.dylib.12.1 libclntsh.dylib
sudo ln -s libclntshcore.dylib.12.1 libclntshcore.dylib
I think only the link to libclntsh.dylib.12.1' is needed. But it does not harm to create the others as well. This way you do not need to runinstall_name_tool` after every upgrade to R.
After creating the links I was able to install ROracle using R CMD INSTALL

Using old packages that has not been updated on newer version of R

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

More issues regarding the installation of Rstem package

This question is related to Issues in Installing Rstem Package, but I think the answer provided in the previous one isn't working for my case.
I've downloaded the source package and the installation isn't working correctly. Any help is welcomed!
install.packages("~/Downloads/Rstem_0.4-1.tar.gz", repos = NULL, type = "source")
This is the error I get:
Warning in install.packages :
package ‘~/Downloads/Rstem_0.4-1.tar.gz’ is not available (for R version 2.15.3)
Installing package(s) into ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library’
(as ‘lib’ is unspecified)
* installing *source* package ‘Rstem’ ...
** libs
*** arch - i386
sh: make: command not found
ERROR: compilation failed for package ‘Rstem’
* removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rstem’
Warning in install.packages :
installation of package ‘/Users/mbtangotan/Downloads/Rstem_0.4-1.tar.gz’ had non-zero exit status
Also tried:
install.packages("Rstem", repos = "http://www.omegahat.org/R", type="source")
Got this as output:
trying URL 'http://www.omegahat.org/R/src/contrib/Rstem_0.4-1.tar.gz'
Content type 'application/x-gzip' length 274336 bytes (267 Kb)
opened URL
downloaded 267 Kb
* installing *source* package ‘Rstem’ ...
** libs
*** arch - i386
sh: make: command not found
ERROR: compilation failed for package ‘Rstem’
* removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rstem’
The downloaded source packages are in
‘/private/var/folders/t3/f4r4rwmn7xl80skj6h35ftnh0000gn/T/RtmpWKxXs2/downloaded_packages’
Warning message:
In install.packages("Rstem", repos = "http://www.omegahat.org/R", :
installation of package ‘Rstem’ had non-zero exit status
R Version: 2.15.3, x86_64, OSX.
If make is not found it suggests you need to install an XCode appropriate to your unspecified version of "OSX".
If you did have XCode installed this should succeed (at least it did just now with my MacPro running OSX 10.6.8, R 3.0.0 RC, and XCode 3.2.6 (1761):
install.packages("Rstem", repos = "http://www.omegahat.org/R", type="source")
Whether there might be other problems, I cannot tell. The package was removed from CRAN, so there may be other alligators in the swamp.
FWIW, I have just uploaded to CRAN a new package called SnowballC, which implements the same functions as Rstem and uses the same algorithms. Binary packages for Mac OS X and Windows will be available in a few hours/days.
http://cran.r-project.org/web/packages/SnowballC/

Resources