gert icon indicating copy to clipboard operation
gert copied to clipboard

libgit2-devel installation problem

Open Dokmen opened this issue 3 years ago • 9 comments

Hi, I'm a local user on linux gnu. I Could not install libgit2-devel on my home directory. The libgit2-devel was updated by administrator, but not for my home directory. When I try to install the devtool package in Rstudio, I get the following error message.

/bin/ld: /tmp/RtmpJoHG5L/R.INSTALL2afb61c528583/gert/libgit2/lib/libgit2.a(annotated_commit.c.o): unrecognized relocation (0x2a) in section .text' /bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status make: *** [gert.so] Error 1 ERROR: compilation failed for package ?gert?

  • removing ?/truba/home/xxx/R/x86_64-pc-linux-gnu-library/4.0/gert? Warning in install.packages : installation of package ?gert? had non-zero exit status ERROR: dependency ?gert? is not available for package ?usethis?
  • removing ?/truba/home/xxx/R/x86_64-pc-linux-gnu-library/4.0/usethis? Warning in install.packages : installation of package ?usethis? had non-zero exit status ERROR: dependency ?usethis? is not available for package ?devtools?
  • removing ?/truba/home/xxx/R/x86_64-pc-linux-gnu-library/4.0/devtools? Warning in install.packages : installation of package ?devtools? had non-zero exit status

The downloaded source packages are in ?/tmp/RtmpuDpCT1/downloaded_packages?`

I can not use sudo or yum. How can I install libgit2-devel (on centos) for devtools package as local user? Can you help me?

Dokmen avatar Apr 07 '21 15:04 Dokmen

If your system administrator has installed libgit2-devel you can try this:

Sys.setenv(USE_SYSTEM_LIBGIT2=1)
install.packages('gert')

If that does not work, you need to update binutils: sudo yum install binutils. See also https://github.com/r-lib/gert/issues/136.

jeroen avatar Apr 07 '21 16:04 jeroen

Thank you for your response. I tried this option. but I got this error: `Error: package or namespace load failed for ?gert? in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/truba/home/xxx/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-gert/00new/gert/libs/gert.so': /lib64/libgit2.so.26: undefined symbol: libssh2_userauth_publickey_frommemory Error: loading failed Execution halted ERROR: loading failed

  • removing ?/truba/home/xxx/R/x86_64-pc-linux-gnu-library/4.0/gert? Warning in install.packages : installation of package ?gert? had non-zero exit status

The downloaded source packages are in ?/tmp/RtmpKWu3DR/downloaded_packages?`

Dokmen avatar Apr 07 '21 16:04 Dokmen

Looks like your local libgit2-devel installation is broken. Can you try to ask your sysadmin to update binutils:

sudo yum install binutils

See also https://github.com/r-lib/gert/issues/136

jeroen avatar Apr 07 '21 16:04 jeroen

I sent an e-mail to administrator. I hope this work :(

Dokmen avatar Apr 07 '21 16:04 Dokmen

I sent an e-mail to administrator. I hope this work :(

Does it work? i 'have the same problem with you

xin-bang avatar May 29 '21 12:05 xin-bang

I was having the same problem but have set up an environment in conda. I ran

conda install -c conda-forge binutils
conda install -c conda-forge libgit2

and that seemed to be what solved it for me.

TheTams avatar Dec 03 '21 12:12 TheTams

I solved this problem with homebrew package

Dokmen avatar Dec 05 '21 10:12 Dokmen

@TheTams This solution works for a conda environment (R 4.1.3). Thanks

jeff-godwin avatar Apr 22 '22 06:04 jeff-godwin

@TheTams Your solution also helped me install gert. You're a champion!

wxguillo avatar May 04 '22 00:05 wxguillo