I use DevTools tools to install
install_github("igraph/rigraph")
I can install "gaborcsardi/pkgconfig" just fine, which is also required. But "igraph/rigraph" doesn't work. I need it because I'm using an experimental package that requires this version of igraph. I get the following error:
compilation terminated.
make: *** [foreign-graphml.o] Error 1
Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-33~1.1/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-33~1.1/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="igraph.dll" SHLIB_LIBADD='$(FLIBS)' WIN=64 TCLBIN=64 ' havde status 2
ERROR: compilation failed for package 'igraph'
* removing 'C:/Users/emil/Documents/R/win-library/3.3/igraph'
Error: Command failed (1)
NOTE! the line "Warning: running command" in the code is translated by myself, since this was in my OS language which is danish. I think it is an accurate translation, but the wording might be slightly different.
I'm on a 64-bit Windows. I also have Lubuntu 16.04 installed on the same machine, and there I don't have any problems with the install. I need to use the package on a windows machine, unfortunately. RTools 3.3 is installed.
I also filed this at the github page:
https://github.com/igraph/rigraph/issues/165
Related
I am getting an error while trying to install Rserve 1.8.6. I can successfully install 1.7.3 from CRAN. This is on Mac OS High Sierra.
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [forward] Error 1
make: *** [all] Error 2
ERROR: compilation failed for package ‘Rserve’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rserve’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rserve’
The downloaded source packages are in
‘/private/var/folders/v7/hyxrfmk94p1_03gdrm27fnxncy3vq1/T/RtmpFHKNMe/downloaded_packages’
This worked for me (MacOS):
In terminal:
brew install openssl
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/
I'm running Mac OS 10.15 Catalina, I've spent 2 days trying to fix this same problem, scouring the internet for help. I finally managed it by cobbling together solutions from a few different sources.
The key thing I was missing was that Mac OS ships with its own version of openssl which it thinks is superior to anything else you can find. It is wrong. What you need to do is go and download the latest version of openssl, install that, then export THAT library to your library path variable. Here are the steps I took with openssl 1.1.1:
Get the version number for the latest version of openssl from the source (https://www.openssl.org/source/) and then manually install it directly where it's supposed to go:
cd /usr/local/src
If you're getting "No such file or directory", make it:
cd /usr/local && mkdir src && cd src
Download openssl using curl (shown) or using the link above to the source code (make sure you put the file in the directory you just made in the previous step):
curl --remote-name https://www.openssl.org/source/openssl-1.1.1f.tar.gz
Extract and cd in:
tar -xzvf openssl-1.1.1f.tar.gz
cd openssl-1.1.1f
Compile and install (these are the 64 bit Mac OS instructions. Refer to the openssl documentation for 32 bit and other OS instructions):
./Configure darwin64-x86_64-cc shared enable-ec_nistp_64_gcc_128 no-ssl2 no-ssl3 no-comp --openssldir=/usr/local/ssl/macos-x86_64
make depend
sudo make install
This created a new openssl folder so when you export the library path you have to feed it the right openssl folder:
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl#1.1/lib/
Hope that helps you if you haven't figured it out yet, and anyone else in the future who is ready to chuck their computer across the room, like I was.
I have installed RTool34 in R and checked with Sys.getenv('PATH').
R version: 3.3.3
For some reasons, I had to install Xgboost 0.4-x on my computer (Windows).
I'm using devtools to install.
Error Message I got:
make: *** [xgboost_R.o] Error 1 Warning: running command 'make -f
"Makevars.win" -f "C:/PROGRA~1/R/R-33~1.3/etc/i386/Makeconf" -f
"C:/PROGRA~1/R/R-33~1.3/share/make/winshlib.mk"
SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)'
SHLIB="xgboost.dll" ' had status 2
ERROR: compilation failed for package 'xgboost'
Can you check your c++ compiler version as well? you would need greater than 4.8 to install the latest version of it. I am not sure if you meant you are not able to install xgboost version 0.4 itself.
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 have following error installing RDCOMClient in R-3.1.2 on a Windows machine from source:
Warning: running command 'make -f "Makevars.win" -f "C:/sw/R-3.1.2/etc/i386/Makeconf" -f "C:/sw/R-3.1.2/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="RDCOMClient.dll" OBJECTS="COMError.o RUtils.o connect.o converters.o"' had status 127
ERROR: compilation failed for package 'RDCOMClient'
Same error happens if I do it via install.package or from the command line.
There is no binary available therefore I have to install it from the source.
Here is the package site:
http://www.omegahat.org/RDCOMClient/
Can somebody help me please? Thank you!
I am trying to install RPostgreSQL on a Mac running OSX 10.9.5 (Mavericks) and R 13.4.0 (Darwin). I guess I don't have a running Postgres installation on my system since, from Terminal:
% which postgres
postgres not found
I use [Postgres.app][1]
I tried installing RPostgreSQL from source
library(devtools)
install('~/Downloads/rpostgresql-read-only/RPostgreSQL')
but I get the error
clang: error: unknown argument: '-Kthread'
clang: error: unknown argument: '-kthread'
make[1]: *** [fe-auth.o] Error 1
make: *** [libpq/libpq.5.dylib] Error 2
ERROR: compilation failed for package ‘RPostgreSQL’
* removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RPostgreSQL’
Error: Command failed (1)
which is not exactly self-explanatory. I google it but I couldn't find any relations with RPostgreSQL.
I was able to do a hack install by removing the 2 -KThread flags from the MakeFile.global.darwin. I can't tell you what the -KThread flag was and why its needed, but it seemed to install fine for Mavericks (10.9.5)
PTHREAD_CFLAGS = -Kthread -kthread -pthread -pthreads -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS
changed to
PTHREAD_CFLAGS = -pthread -pthreads -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS
There's a possibly more user-friendly approach described at this blog with additional notes at the bottom of the PecanProject GitHub repo issue thread.
You'll probably have to manually link to the directory with pg_config file to address the 'libpq-fe.h' file not found issue. In my case, the command was different from that mentioned in the PecanProject issue thread:
sudo ln -s /usr/local/Cellar/postgresql/9.4.0/bin/pg_config /usr/local/bin/
I then had to
sudo ln -s /usr/local/Cellar/postgresql /usr/local/opt/postgresql
to get around a Library not loaded: /usr/local/opt/postgresql/lib/libpq.5.dylib error.
A final hat-tip to Chris Chou for that last point.