環境
CentOS8 (WSL2)
R 4.0.3 + Rstudio Server
目的
Rパッケージ'devtools'をインストールする。
問題点
以下のようにインストールを試みましたが失敗しました。
Rstudio
1> install.packages('devtools') 2Installing package into ‘/home/user/R/x86_64-redhat-linux-gnu-library/4.0’ 3(as ‘lib’ is unspecified) 4also installing the dependencies ‘gert’, ‘usethis’ 5 6trying URL 'https://cran.rstudio.com/src/contrib/gert_1.0.2.tar.gz' 7Content type 'application/x-gzip' length 61324 bytes (59 KB) 8================================================== 9downloaded 59 KB 10 11trying URL 'https://cran.rstudio.com/src/contrib/usethis_2.0.0.tar.gz' 12Content type 'application/x-gzip' length 556740 bytes (543 KB) 13================================================== 14downloaded 543 KB 15 16trying URL 'https://cran.rstudio.com/src/contrib/devtools_2.3.2.tar.gz' 17Content type 'application/x-gzip' length 373387 bytes (364 KB) 18================================================== 19downloaded 364 KB 20 21* installing *source* package ‘gert’ ... 22** package ‘gert’ successfully unpacked and MD5 sums checked 23** using staged installation 24Using PKG_CFLAGS= 25Using PKG_LIBS=-lgit2 26----------------------------- ANTICONF ------------------------------- 27Configuration failed to find libgit2 library. Try installing: 28 * brew: libgit2 (MacOS) 29 * deb: libgit2-dev (Debian, Ubuntu, etc) 30 * rpm: libgit2-devel (Fedora, CentOS, RHEL) 31If libgit2 is already installed, check that 'pkg-config' is in your 32PATH and PKG_CONFIG_PATH contains a libgit2.pc file. If pkg-config 33is unavailable you can set INCLUDE_DIR and LIB_DIR manually via: 34R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...' 35-------------------------- [ERROR MESSAGE] --------------------------- 36<stdin>:1:10: fatal error: git2.h: No such file or directory 37compilation terminated. 38---------------------------------------------------------------------- 39ERROR: configuration failed for package ‘gert’ 40* removing ‘/home/user/R/x86_64-redhat-linux-gnu-library/4.0/gert’ 41Warning in install.packages : 42 installation of package ‘gert’ had non-zero exit status 43ERROR: dependency ‘gert’ is not available for package ‘usethis’ 44* removing ‘/home/user/R/x86_64-redhat-linux-gnu-library/4.0/usethis’ 45Warning in install.packages : 46 installation of package ‘usethis’ had non-zero exit status 47ERROR: dependency ‘usethis’ is not available for package ‘devtools’ 48* removing ‘/home/user/R/x86_64-redhat-linux-gnu-library/4.0/devtools’ 49Warning in install.packages : 50 installation of package ‘devtools’ had non-zero exit status 51 52The downloaded source packages are in 53 ‘/tmp/Rtmpsi97ZD/downloaded_packages’ 54>
試したこと
メッセージにTry installing:rpm: libgit2-devel (Fedora, CentOS, RHEL)とあるので、libgit2-develのインストールを試みましたが失敗しました。
Terminal
1[user@USER ~]$ sudo yum update 2[sudo] password for user: 3Last metadata expiration check: 22:40:41 ago on Thu 24 Dec 2020 01:49:19 PM JST. 4Dependencies resolved. 5Nothing to do. 6Complete! 7[user@USER ~]$ sudo yum install libgit2-devel 8Last metadata expiration check: 22:57:18 ago on Thu 24 Dec 2020 01:49:19 PM JST. 9No match for argument: libgit2-devel 10Error: Unable to find a match: libgit2-devel 11[user@USER ~]$
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/12/25 07:01
2020/12/25 07:07
2020/12/25 07:14
2020/12/25 07:48
2020/12/25 07:51
2020/12/25 07:52
2020/12/25 09:12
2020/12/25 09:21
2020/12/25 09:32
2020/12/25 10:33
2020/12/25 13:30
2020/12/25 15:23
2020/12/26 10:17