Closed ferricoxide closed 3 years ago
This may be a "never mind":
Ran the R-4.0.3 installer with just gert
as my module to install. Looks like there's now a need for libgit2-devel
on RHEL 7 that I hadn't previously run into. Testing, now to verify.
I believe this is documented in the README here:
https://github.com/r-lib/gert#installation
(but it sounds like the exact fix didn't bubble up to you until you were installing only gert)
Hello, I am having a similar issue with installing devtools
in R 3.6.3 on Amazon AWS Linux (which I realize is a special case). As above, this was working a few weeks ago prior to the gert
update.
Here is the error I get:
also installing the dependencies ‘gert’, ‘usethis’
Warning message in install.packages("devtools"):
“installation of package ‘gert’ had non-zero exit status”Warning message in install.packages("devtools"):
“installation of package ‘usethis’ had non-zero exit status”Warning message in install.packages("devtools"):
“installation of package ‘devtools’ had non-zero exit status”Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
I am also unable to install gert alone:
Warning message in install.packages("gert"):
“installation of package ‘gert’ had non-zero exit status”Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
I was able to install the libgit2-devel package, but the errors remain. There is a very similar issue on stackoverflow, where they get a more verbose error from miniconda. Do you have any suggestions for configuring git2r?
configure: Package dependency requirement 'libgit2 >= 0.26.0' could not be satisfied.
-----------------------------------------------------------------------
Unable to find the libgit2 library on this system. Building 'git2r'
using the bundled source of the libgit2 library.
To build git2r with a system installation of libgit2, please install:
libgit2-dev (package on e.g. Debian and Ubuntu)
libgit2-devel (package on e.g. Fedora, CentOS and RHEL)
libgit2 (Homebrew package on OS X)
and try again.
If the libgit2 library is installed on your system but the git2r
configuration is unable to find it, you can specify the include and
lib path to libgit2 with:
given you downloaded a tar-gz archive:
R CMD INSTALL git2r-.tar.gz --configure-vars='INCLUDE_DIR=/path/to/include LIB_DIR=/path/to/lib'
or cloned the GitHub git2r repository into a directory:
R CMD INSTALL git2r/ --configure-vars='INCLUDE_DIR=/path/to/include LIB_DIR=/path/to/lib'
or download and install git2r in R using
install.packages('git2r', type='source', configure.vars='LIB_DIR=-L/path/to/libs INCLUDE_DIR=-I/path/to/headers')
On macOS, another possibility is to let the configuration
automatically download the libgit2 library from the Homebrew
package manager with:
R CMD INSTALL git2r-.tar.gz --configure-vars='autobrew=yes'
or
R CMD INSTALL git2r/ --configure-vars='autobrew=yes'
or
install.packages('git2r', type='source', configure.vars='autobrew=yes')
You seem to be confusing the gert
package with the git2r
package. Also it is not clear if you are using anaconda or another build of R.
If you use anaconda I think you need to conda install -c conda-forge r-gert
.
If you do not use anaconda, you need to yum install libgit2-devel
and after that in R: install.packages("gert")
. If that doesn't work, please include the output of the latter, and also your sessionInfo()
I ran into the same issue with an automated weekly build and had to add libgit2-dev and libcurl4-gnutls-dev, and remove libcurl4-openssl-dev on Ubuntu 18.04 because of library conflicts.
@jasonheffner you can also use the ppa to avoid the conflict, see the readme.
@jeroen Thanks, I'll keep that as an option in case we run into issues. I see they have the ppa also for bionic.
I am using rocker (https://hub.docker.com/r/rocker/r-ver) with R 3.5.2 and ran into the same issue when trying to install gert
. However I could not solve it. I tried adding libgit2-dev
and libcurl4-gnutls-dev
(and removing libcurl4-openssl-dev
).
Here is my Dockerfile:
FROM rocker/r-ver:3.5.2
RUN apt-get update --fix-missing -qq && apt-get install -y -q \
libssl-dev \
libcurl4-gnutls-dev \
libgit2-dev \
&& apt-get clean \
&& apt-get purge \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN R -e 'install.packages(c("gert"), repos="http://cloud.r-project.org/")'
Here is the error I get:
* installing *source* package ‘gert’ ...
** package ‘gert’ successfully unpacked and MD5 sums checked
Using PKG_CFLAGS=
Using PKG_LIBS=-lgit2
WARNING: your version of libgit2 is really old! HTTPS / SSH might not work
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 tag.o utils.o version.o
gcc -I"/usr/local/lib/R/include" -DNDEBUG -DR_NO_REMAP -DSTRICT_R_HEADERS -I/usr/local/include -fvisibility=hidden -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c branch.c -o branch.o
gcc -I"/usr/local/lib/R/include" -DNDEBUG -DR_NO_REMAP -DSTRICT_R_HEADERS -I/usr/local/include -fvisibility=hidden -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c clone.c -o clone.o
clone.c: In function ‘R_git_remote_ls’:
clone.c:436:11: error: too many arguments to function ‘git_remote_connect’
bail_if(git_remote_connect(remote, GIT_DIRECTION_FETCH, &callbacks, NULL, NULL), "git_remote_connect");
^~~~~~~~~~~~~~~~~~
In file included from /usr/include/git2/clone.h:14:0,
from /usr/include/git2.h:19,
from utils.h:1,
from clone.c:6:
/usr/include/git2/remote.h:247:17: note: declared here
GIT_EXTERN(int) git_remote_connect(git_remote *remote, git_direction direction, const git_remote_callbacks *callbacks, const git_strarray *custom_headers);
^~~~~~~~~~~~~~~~~~
make: *** [clone.o] Error 1
/usr/local/lib/R/etc/Makeconf:162: recipe for target 'clone.o' failed
ERROR: compilation failed for package ‘gert’
* removing ‘/usr/local/lib/R/site-library/gert’
I tried via the ppa and it did not work either (although I think this is only available for ubuntu).
Any hint? Thanks!
I tested quickly and the Dockerfile above seems to build fine .. perhaps try with --no-cache?
Still failing with --no-cache
. I managed to get it working but compiling libgit2
from source:
RUN git clone --depth=1 -b v1.0.0 https://github.com/libgit2/libgit2.git ~/libgit2_src \
&& cd ~/libgit2_src \
&& cmake . -DBUILD_CLAR=OFF -DCMAKE_BUILD_TYPE=Release -DEMBED_SSH_PATH=~/libssh2_src -DCMAKE_INSTALL_PREFIX=~/libgit2 \
&& cmake --build . --target install \
&& cp -r ~/libgit2/* /usr/bin \
&& cp -r ~/libgit2/* /usr/local
(previously adding to apt-get install
the dependencies cmake
, pkg-config
and git
)
I believe this is documented in the README here:
https://github.com/r-lib/gert#installation
(but it sounds like the exact fix didn't bubble up to you until you were installing only gert)
Bingo. It was a dependency to devtools via usethis. Two layers deep. =)
I am on macOS Big Sur. Managed to install devtools after running:
brew install libgit2
install.packages("gert")
install.packages("devtools", dependencies = TRUE)
On macOS Big Sur, this worked for me on typing these in terminal: 1) brew update 2) brew upgrade 3) brew install libgit2 4) pip3 install pygit2 5) brew install libxml2 6) install.packages("gert") 7) install.packages("devtools", dependencies = TRUE)
Hello:
It looks like there may be an issue with this module. When I try to install the
devtools
modules, it has a dependency on theusethis
module which, in turn, has a dependency ongert
. A few weeks ago, prior to the 1.0.1 → 1.0.2 update, installingdevtools
from CRAN worked without issue under R 4.0.3. However, when I tried to do a monthly update of our build, I'm now getting errors. I'm installing using:On Red Hat 7.9. The installation starts out with the message:
When it gets down to the part where the gert (indirect) dependency is being resolved, the error:
Is printed. This is later followed by:
And ultimately:
Is there any way to produce more-useful diagnostics to produce a more-useful issue-report?