I just try to install the 'Rsymphony' package and it failed and the error indicator says
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.2/Resources/library/Rsymphony’
Addition: my platform is mac os.
Alternatively, open terminal and type:
curl -O http://r.research.att.com/libs/gfortran-4.8.2-darwin13.tar.bz2
sudo tar fvxz gfortran-4.8.2-darwin13.tar.bz2 -C /
reference to Rcpp, RcppArmadillo and OS X Mavericks "-lgfortran" and "-lquadmath" error
Related
I am developing an R package called DescObs (https://github.com/MaaniBeigy/DescObs). It imports conf.limits.nct function from MBESS, which itself depends on another package called gsl. It shows no problems at all for R CMD check and the installation of DescObs on Linux machines assessed by Travis continuous integration platform (https://travis-ci.org/MaaniBeigy/DescObs). However, AppVeyor fails:
** libs
*** arch - i386
C:/Rtools/mingw_32/bin/gcc -I"c:/R/include" -DNDEBUG -I/include -O3 -Wall -std=gnu99 -mtune=generic -c airy.c -o airy.o
airy.c:1:29: fatal error: gsl/gsl_sf_airy.h: No such file or directory
#include <gsl/gsl_sf_airy.h>
^
compilation terminated.
make: *** [c:/R/etc/i386/Makeconf:208: airy.o] Error 1
ERROR: compilation failed for package 'gsl'
* removing 'c:/RLibrary/gsl'
Error in i.p(...) :
(converted from warning) installation of package 'gsl' had non-zero exit status
Calls: <Anonymous> ... with_rprofile_user -> with_envvar -> force -> force -> i.p
Execution halted
Command exited with code 1
I also tried the solution recommended in Building an R package that uses the GSL on Windows but it did not help. I also compiled it using mingw-w64 and gcc-4.6.3, which both showed the same error.
Moreover, I tried to install by - cmd: vcpkg install gsl:x64-windows, but did show the same error. Here, you can see my appveyor.yml.
Do you have any ideas?
Fortunately, my previous appveyor.yml could finally build it:
install:
- ps: Bootstrap
- cmd: git submodule update --init --recursive
- cmd: git clone https://github.com/CxxTest/cxxtest
- cmd: cd c:\tools\vcpkg
- cmd: vcpkg integrate install
- cmd: vcpkg install gsl:x64-windows
- cmd: vcpkg install fftw3:x64-windows
- cmd: cd "%APPVEYOR_BUILD_FOLDER%"
environment:
global:
USE_RTOOLS: true
NOT_CRAN: true
_R_CHECK_FORCE_SUGGESTS: true
_R_CHECK_CRAN_INCOMING_: true
#R_CHECK_ARGS: "--run-dontrun"
matrix:
- R_VERSION: devel
R_ARCH: x64
GCC_PATH: gcc-4.6.3
I do not know the exact reason, but I am glad it works.
edit: I faced the problem again in another package. This line by Owen McDonnell image: previous visual studio 2015 could solve the problem. Refer to cvcqv package for the full appveyor.yml.
I came to this thread because I faced what I think is a very similar situation when I tried to update the package gsl:
installing source package 'gsl' ...
** package 'gsl' successfully unpacked and MD5 sums checked
** using staged installation
********************************************** WARNING: this
package has a configure script
It probably needs manual configuration **********************************************
** libs "C:/rtools40/mingw64/bin/"gcc -I"C:/PROGRA~1/R/R-4.1.1/include" -DNDEBUG -I/include -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c airy.c -o airy.o airy.c:1:10: fatal error: gsl/gsl_sf_airy.h: No such file or
directory #include <gsl/gsl_sf_airy.h>
^~~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [C:/PROGRA~1/R/R-4.1.1/etc/x64/Makeconf:238: airy.o] Error 1 ERROR:
compilation failed for package 'gsl'
removing 'C:/Users/shima/OneDrive/Documents/R/win-library/4.1/gsl'
restoring previous 'C:/Users/shima/OneDrive/Documents/R/win-library/4.1/gsl' Warning in
install.packages : installation of package ‘gsl’ had non-zero exit
status
This thread helped me find the solution, a warm thank you, along with this discussion and this one
For those of you on Windows, using Rtools, here are my steps to solve this issue, i.e. not being able to update gsl package in R under windows:
start Rtools Bash (found in apps, Rtools 4.0 in the Windows menu)
Run pacman -S mingw-w64-x86_64-gsl and confirm with yes (y)
I don't think it's relevant, but i ran pacman -Syu just before to update my Rtools and throwing the command pacman -Sl gave me the correct name of the package for the pacman command in 2.
Updating gsl in Rstudio now leads to a clean
DONE (gsl)
I would like to know if anyone has the solution for the following SP package installation error in Linux Mint 19? Here's the error message.
/bin/bash: line 2: g++: command not found
/usr/share/R/share/make/shlib.mk:6: recipe for target 'sp.so' failed
make: *** [sp.so] Error 127
ERROR: compilation failed for package ‘sp’
Thanks, Kaio.
It seems you don’t have the g++ compiler.
Open a terminal window and try
sudo apt-get install g++
The other alternative which includes some common build libraries is
sudo apt-get install build-essencial
Then try to reinstall the R package.
I'm attempting to use the gganiminate library and I'm having an issue when I call gganimate::gganimate(myplot). The issue appears to be with a dependency library, magick.
When I call the function I get the following warning:
gganimate::gganimate(p)
1: running command 'C:\WINDOWS\system32\cmd.exe /c convert --version' had status 4
2: In find_magic() : ImageMagick not installed yet!
In im.convert(img.files, output = path.expand(movie.name), ... :
Please install ImageMagick first or put its bin path into the system PATH variable
So I try to install magick separately. I'm on a machine at a client so installing packages from github requires me to provide info to get through the firewall. I've installed other libraries from github with this machine using the same technique successfully. However, magick appears to be bumping into other problems. Below is my code and the error:
devtools::install_github("ropensci/magick",httr::set_config(httr::use_proxy("xx.xxx.xx.xx",xxxx)))
Downloading GitHub repo ropensci/magick#master
from URL https://api.github.com/repos/ropensci/magick/zipball/master
Installing magick
"C:/PROGRA~1/R/R-34~1.3/bin/x64/R" \
--no-site-file --no-environ --no-save \
--no-restore --quiet CMD INSTALL \
"C:/Users/r631265/AppData/Local/Temp/1/RtmpS0efnQ/devtools18fc5f2414b/ropensci-magick-7925af3" \
--library="C:/Users/r631265/Documents/R/win-library/3.4" \
--install-tests
* installing *source* package 'magick' ...
** libs
*** arch - i386
rm -f RcppExports.o animation.o attributes.o base.o color.o composite.o config.o convolve.o device.o edit.o fonts.o options.o resize.o transformations.o magick.dll
Linking to imagemagagick-6.9.9
"C:/PROGRA~1/R/R-34~1.3/bin/i386/Rscript.exe" "../tools/winlibs.R" 6.9.9
Error in curl::curl_download(sprintf("https://github.com/rwinlib/imagemagick%s/archive/v%s.zip", :
schannel: failed to receive handshake, SSL/TLS connection failed
Calls: <Anonymous> -> .Call
Execution halted
make: *** [winlibs] Error 1
Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-34~1.3/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-34~1.3/share/make/winshlib.mk" CXX='$(CXX11) $(CXX11STD)' CXXFLAGS='$(CXX11FLAGS)' CXXPICFLAGS='$(CXX11PICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX11LDFLAGS)' SHLIB_LD='$(SHLIB_CXX11LD)' SHLIB="magick.dll" OBJECTS="RcppExports.o animation.o attributes.o base.o color.o composite.o config.o convolve.o device.o edit.o fonts.o options.o resize.o transformations.o"' had status 2
ERROR: compilation failed for package 'magick'
* removing 'C:/Users/r631265/Documents/R/win-library/3.4/magick'
In R CMD INSTALL
Installation failed: Command failed (1)
I think perhaps my firewall details aren't getting passed into: curl::curl_download(sprintf("https://github.com/rwinlib/imagemagick%s/archive/v%s.zip",...)
Network security is a bit of a black box to me so I'm not sure what else to try or if I'm diagnosing the issue correctly. Any help would be greatly appreciated!
Installing statnet on mac 10.10.3 with R 3.2.x (RStudio 0.99.441).
ld: warning: directory not found for option '-L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [latentnet.so] Error 1
ERROR: compilation failed for package ‘latentnet’
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/latentnet’
Warning in install.packages :
installation of package ‘latentnet’ had non-zero exit status
ERROR: dependency ‘latentnet’ is not available for package ‘statnet’
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/statnet’
Warning in install.packages :
installation of package ‘statnet’ had non-zero exit status
I tried updating XCode/Command Line Tools. Also tried not installing dependencies. I have been able to install other packages, such as ergm and sna.
It looks like the install is looking for the GCC folder and not finding it.
whereis gcc
reveals that my gcc is in /usr/bin/gcc
It looks like the install is looking for it in /usr/local/lib/gcc/
Is there a way to fix this?
This is a compilation error that you only get if you are trying to install packages from source, or when a package requires a library to be compiled from source. Normally, if you don’t use the latest version of R, you can install statnet from binary and thus R won’t have to compile the source package.
The version you are mentioning at the beginning of your message (0.99.441) is the version of your R-Studio, and not R. The version of your R is 3.2.x (Hence its address in the Library folder: /Library/Frameworks/R.framework/Versions/3.2/Resources…). Before trying to fix the compilation error you may want to try to roll back your R to a version like 3.1.2 or 3.1.3 on which you can probably download and install statnet in binary format.
For the compiler, my guess is that even if you fix the address of your gcc with a symlink, you will still get an error about gfortran or the version of gcc. Once I solved this issue by installing R and the right version of gcc through Homebrew, but right now I don’t have the possibility to try the solution and tell you exactly how.
My experience (on Yosemite) is that if you use 3.1.2 or 3.1.3, even if there is need for compilation, the error with gcc won’t occur.
sudo mkdir /usr/bin/lib && sudo ln -s /usr/bin/gcc /usr/bin/lib/gcc
Creates a new directory in /usr/bin called `lib' and creates a symbolic link to gcc in that new directory.
If that doesn't fix the error, you can undo it with:
sudo rm -i /usr/bin/lib/gcc && sudo rm -id /usr/bin/lib
I am not able to call rJava package in R 3.0. I got the following message
Error: package ‘rJava’ was built before R 3.0.0: please re-install it
I am getting error when I tried to re-install rJava package. I have provided the output of R CMD javareconf
Java interpreter : /usr/bin/java
Java version : 1.7.0_21
Java home path : /usr/lib/jvm/java-7-openjdk-i386/jre
Java compiler : /usr/lib/jvm/java-7-openjdk-i386/jre/../bin/javac
Java headers gen.: /usr/lib/jvm/java-7-openjdk-i386/jre/../bin/javah
Java archive tool: /usr/lib/jvm/java-7-openjdk-i386/jre/../bin/jar
trying to compile and link a JNI progam
detected JNI cpp flags :
detected JNI linker flags :
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -O2 -pipe -g -c conftest.c -o conftest.o
conftest.c:1:17: fatal error: jni.h: No such file or directory
compilation terminated.
make: *** [conftest.o] Error 1
Unable to compile a JNI program
Java library path:
JNI cpp flags :
JNI linker flags :
Updating Java configuration in /usr/lib/R
Done.
I am using Ubuntu 13.04. I also tried apt-get install r-cran-rjava which is not helping to solve the issue. Regarding jni.h there were some solution here. But, not sure how can I use the solution here.
I ran into the exact same issue. My solution was to install the openjdk-7-* via
sudo apt-get install openjdk-7-*
Followed that with
sudo R CMD javareconf
and I was then able to install rJava in R via install.packages("rJava").
While perhaps not the most elegant solution it appears to have solved my problems with getting rJava to work.
For those getting the error:
error: unable to load shared object '/some/dir/rJava/libs/rJava.so': libjvm.so:
cannot open shared object file: No such file or directory
I solved the error locating the library in the system and linking them to /usr/lib:
$sudo updatedb
$locate libjvm.so
/usr/lib/debug/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/libjvm.so
/usr/lib/debug/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/zero/libjvm.so
/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/jamvm/libjvm.so
/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/libjvm.so
/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/zero/libjvm.so
$sudo ln -s /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/libjvm.so /usr/lib/
Installing rJava from the distribution packages as proposed in this askUbuntu answer also works:
sudo apt-get install r-cran-rjava
NOTE: tried from a Debian system.
I was also facing same error which was on RHEL8.1 & i resolved it as follows:
yum --enablerepo=* install java-1.8*
later i ran same command which was giving me error logs of R server.
R CMD javareconf
which turns into following output.