gert
gert copied to clipboard
gert install cannot open shared object file
I'm trying to install gert and receiving some errors. I tried fixes suggested in other posts with no luck.
$ echo $LD_LIBRARY_PATH
/opt/glpk-4.65/lib:/usr/local/lib:usr/local/lib64:/opt/app/SybaseIQ/IQ-16_1/lib64:/home/xxxxx/libgit2-1.1.1/build
$ /opt/R/R-3.5.3/bin/R CMD INSTALL gert_1.3.2.tar.gz --configure-vars='INCLUDE_DIR=/home/xxxxx/libgit2-1.1.1/include LIB_DIR=/home/xxxxx/libgit2-1.1.1/build'
* installing to library ‘/projects/Analysts/R/x86_64-pc-linux-gnu-library/3.5’
* installing *source* package ‘gert’ ...
** package ‘gert’ successfully unpacked and MD5 sums checked
> curl::curl_download("https://r-lib.github.io/gert/get-libgit2-linux.sh","get-libgit2-linux.sh")
Error in curl::curl_download("https://r-lib.github.io/gert/get-libgit2-linux.sh", :
Failed connect to r-lib.github.io:443; Operation now in progress
Execution halted
Found INCLUDE_DIR and/or LIB_DIR!
Using PKG_CFLAGS=-I/home/xxxxx/libgit2-1.1.1/include
Using PKG_LIBS=-L/home/xxxxx/libgit2-1.1.1/build -lgit2
Configuration OK!
** libs
rm -f gert.so branch.o clone.o commit.o config.o conflicts.o files.o init.o merge.o rebase.o stash.o submodules.o tag.o utils.o version.o
/opt/rh/devtoolset-9/root/usr/bin/gcc -I"/opt/R/R-3.5.3/lib64/R/include" -DNDEBUG -I/home/xxxxx/libgit2-1.1.1/include -DR_NO_REMAP -DSTRICT_R_HEADERS -I/usr/local/include -fvisibility=hidden -fpic -g -O2 -c branch.c -o branch.o
/opt/rh/devtoolset-9/root/usr/bin/gcc -I"/opt/R/R-3.5.3/lib64/R/include" -DNDEBUG -I/home/xxxxx/libgit2-1.1.1/include -DR_NO_REMAP -DSTRICT_R_HEADERS -I/usr/local/include -fvisibility=hidden -fpic -g -O2 -c clone.c -o clone.o
/opt/rh/devtoolset-9/root/usr/bin/gcc -I"/opt/R/R-3.5.3/lib64/R/include" -DNDEBUG -I/home/xxxxx/libgit2-1.1.1/include -DR_NO_REMAP -DSTRICT_R_HEADERS -I/usr/local/include -fvisibility=hidden -fpic -g -O2 -c commit.c -o commit.o
/opt/rh/devtoolset-9/root/usr/bin/gcc -I"/opt/R/R-3.5.3/lib64/R/include" -DNDEBUG -I/home/xxxxx/libgit2-1.1.1/include -DR_NO_REMAP -DSTRICT_R_HEADERS -I/usr/local/include -fvisibility=hidden -fpic -g -O2 -c config.c -o config.o
/opt/rh/devtoolset-9/root/usr/bin/gcc -I"/opt/R/R-3.5.3/lib64/R/include" -DNDEBUG -I/home/xxxxx/libgit2-1.1.1/include -DR_NO_REMAP -DSTRICT_R_HEADERS -I/usr/local/include -fvisibility=hidden -fpic -g -O2 -c conflicts.c -o conflicts.o
/opt/rh/devtoolset-9/root/usr/bin/gcc -I"/opt/R/R-3.5.3/lib64/R/include" -DNDEBUG -I/home/xxxxx/libgit2-1.1.1/include -DR_NO_REMAP -DSTRICT_R_HEADERS -I/usr/local/include -fvisibility=hidden -fpic -g -O2 -c files.c -o files.o
/opt/rh/devtoolset-9/root/usr/bin/gcc -I"/opt/R/R-3.5.3/lib64/R/include" -DNDEBUG -I/home/xxxxx/libgit2-1.1.1/include -DR_NO_REMAP -DSTRICT_R_HEADERS -I/usr/local/include -fvisibility=hidden -fpic -g -O2 -c init.c -o init.o
/opt/rh/devtoolset-9/root/usr/bin/gcc -I"/opt/R/R-3.5.3/lib64/R/include" -DNDEBUG -I/home/xxxxx/libgit2-1.1.1/include -DR_NO_REMAP -DSTRICT_R_HEADERS -I/usr/local/include -fvisibility=hidden -fpic -g -O2 -c merge.c -o merge.o
/opt/rh/devtoolset-9/root/usr/bin/gcc -I"/opt/R/R-3.5.3/lib64/R/include" -DNDEBUG -I/home/xxxxx/libgit2-1.1.1/include -DR_NO_REMAP -DSTRICT_R_HEADERS -I/usr/local/include -fvisibility=hidden -fpic -g -O2 -c rebase.c -o rebase.o
/opt/rh/devtoolset-9/root/usr/bin/gcc -I"/opt/R/R-3.5.3/lib64/R/include" -DNDEBUG -I/home/xxxxx/libgit2-1.1.1/include -DR_NO_REMAP -DSTRICT_R_HEADERS -I/usr/local/include -fvisibility=hidden -fpic -g -O2 -c stash.c -o stash.o
/opt/rh/devtoolset-9/root/usr/bin/gcc -I"/opt/R/R-3.5.3/lib64/R/include" -DNDEBUG -I/home/xxxxx/libgit2-1.1.1/include -DR_NO_REMAP -DSTRICT_R_HEADERS -I/usr/local/include -fvisibility=hidden -fpic -g -O2 -c submodules.c -o submodules.o
/opt/rh/devtoolset-9/root/usr/bin/gcc -I"/opt/R/R-3.5.3/lib64/R/include" -DNDEBUG -I/home/xxxxx/libgit2-1.1.1/include -DR_NO_REMAP -DSTRICT_R_HEADERS -I/usr/local/include -fvisibility=hidden -fpic -g -O2 -c tag.c -o tag.o
/opt/rh/devtoolset-9/root/usr/bin/gcc -I"/opt/R/R-3.5.3/lib64/R/include" -DNDEBUG -I/home/xxxxx/libgit2-1.1.1/include -DR_NO_REMAP -DSTRICT_R_HEADERS -I/usr/local/include -fvisibility=hidden -fpic -g -O2 -c utils.c -o utils.o
/opt/rh/devtoolset-9/root/usr/bin/gcc -I"/opt/R/R-3.5.3/lib64/R/include" -DNDEBUG -I/home/xxxxx/libgit2-1.1.1/include -DR_NO_REMAP -DSTRICT_R_HEADERS -I/usr/local/include -fvisibility=hidden -fpic -g -O2 -c version.c -o version.o
/opt/rh/devtoolset-9/root/usr/bin/gcc -shared -L/opt/R/R-3.5.3/lib64/R/lib -L/usr/local/lib64 -o gert.so branch.o clone.o commit.o config.o conflicts.o files.o init.o merge.o rebase.o stash.o submodules.o tag.o utils.o version.o -L/home/xxxxx/libgit2-1.1.1/build -lgit2 -L/opt/R/R-3.5.3/lib64/R/lib -lR
installing to /projects/Analysts/R/x86_64-pc-linux-gnu-library/3.5/gert/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error: package or namespace load failed for ‘gert’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/projects/Analysts/R/x86_64-pc-linux-gnu-library/3.5/gert/libs/gert.so':
libgit2.so.1.1: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/projects/Analysts/R/x86_64-pc-linux-gnu-library/3.5/gert’
I also set PATH and PKG_CONFIG_PATH:
$ echo $PATH
/opt/app/SybaseIQ/IQ-16_1/bin64:/usr/local/bin/swig:/usr/local/share/swig/3.0.8:/usr/local/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/usr/bin/pkg-config
$ echo $PKG_CONFIG_PATH
/usr/bin/pkg-config:/home/xxxxx/libgit2-1.1.1/build/libgit2.pc
Then I tried to install from within R:
> install.packages("gert")
Installing package into ‘/projects/CI_Analysts/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
* installing *source* package ‘gert’ ...
** package ‘gert’ successfully unpacked and MD5 sums checked
> curl::curl_download("https://r-lib.github.io/gert/get-libgit2-linux.sh","get-libgit2-linux.sh")
Error in curl::curl_download("https://r-lib.github.io/gert/get-libgit2-linux.sh", :
Failed connect to r-lib.github.io:443; Operation now in progress
Execution halted
Using PKG_CFLAGS=
Using PKG_LIBS=-lgit2
----------------------------- ANTICONF -------------------------------
Configuration failed to find libgit2 library. Try installing:
* brew: libgit2 (MacOS)
* deb: libgit2-dev (Debian, Ubuntu, etc)
* rpm: libgit2-devel (Fedora, CentOS, RHEL)
If libgit2 is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libgit2.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 MESSAGE] ---------------------------
<stdin>:1:10: fatal error: git2.h: No such file or directory
compilation terminated.
----------------------------------------------------------------------
ERROR: configuration failed for package ‘gert’
* removing ‘/projects/CI_Analysts/R/x86_64-pc-linux-gnu-library/3.5/gert’
Warning in install.packages :
installation of package ‘gert’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpgDMyj8/downloaded_packages’
Here is my sessionInfo()
R version 3.5.3 (2019-03-11)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Server 7.9 (Maipo)
Matrix products: default
BLAS: /opt/R/R-3.5.3/lib64/R/lib/libRblas.so
LAPACK: /opt/R/R-3.5.3/lib64/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8
[6] LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] httr_1.3.1 compiler_3.5.3 magrittr_1.5 R6_2.4.1 assertthat_0.2.1 miniCRAN_0.2.14 tools_3.5.3 igraph_1.2.1
[9] pkgconfig_2.0.1 renv_0.14.0
It looks like your internet isn't working during installation? That would be the easiest solution but it fails to download from r-lib.github.io
The second best solution would be to install libgit2 from your OS, i.e. sudo yum install libgit2-devel
.
If you really want to use a custom built libgit2, it may be easier to built a static one instead of shared.
In your second example you need to set PKG_CONFIG_PATH
to the directory where your libgit2.pc
file lives, not the file itself. For example PKG_CONFIG_PATH=/usr/bin/pkg-config:/home/8b3sb/libgit2-1.1.1/build/
`
Unfortunately, I can't download anything from the Internet (strict firewall!) on the server I'm using to install the gert
package. I also don't have sudo
priveleges.
Just to confirm, it sounds like the main issue is the following part of the install?
> curl::curl_download("https://r-lib.github.io/gert/get-libgit2-linux.sh","get-libgit2-linux.sh")
Error in curl::curl_download("https://r-lib.github.io/gert/get-libgit2-linux.sh", :
Failed connect to r-lib.github.io:443; Operation now in progress
Execution halted
I'm able to download https://r-lib.github.io/gert/get-libgit2-linux.sh
and then upload the file to the server where I want to perform the install.
Given these constraints, is there anything I can do to make the install work?
Same issue here. To quote @tedmoorman, Given these constraints, is there anything I can do to make the install work?