can't install devtool

hi, my r version is 3.6.1
ubuntu 18.04
currently working on docker container

i can't install devtool...

Installing package into ‘/home/rstudio/R/x86_64-conda_cos6-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
also installing the dependencies ‘gert’, ‘usethis’

trying URL 
Content type 'application/x-gzip' length 61324 bytes (59 KB)
==================================================
downloaded 59 KB

trying URL 
Content type 'application/x-gzip' length 556740 bytes (543 KB)
==================================================
downloaded 543 KB

trying URL 'https://cran.rstudio.com/src/contrib/devtools_2.3.2.tar.gz'
Content type 'application/x-gzip' length 373387 bytes (364 KB)
==================================================
downloaded 364 KB

* installing *source* package ‘gert’ ...
** package ‘gert’ successfully unpacked and MD5 sums checked
** using staged installation
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/usr/local/include
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 ‘/home/rstudio/R/x86_64-conda_cos6-linux-gnu-library/3.6/gert’
Warning in install.packages :
  installation of package ‘gert’ had non-zero exit status
ERROR: dependency ‘gert’ is not available for package ‘usethis’
* removing ‘/home/rstudio/R/x86_64-conda_cos6-linux-gnu-library/3.6/usethis’
Warning in install.packages :
  installation of package ‘usethis’ had non-zero exit status
ERROR: dependency ‘usethis’ is not available for package ‘devtools’
* removing ‘/home/rstudio/R/x86_64-conda_cos6-linux-gnu-library/3.6/devtools’
Warning in install.packages :
  installation of package ‘devtools’ had non-zero exit status

The downloaded source packages are in
	‘/tmp/RtmpUZLQ0b/downloaded_packages’

I installed with command terminal to "apt-get install libgit2-dev", but I keep getting the same error.

plz save me from R...(i tried dependencies = TRUE, but it's meaningless)Preformatted text

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.