Ubuntu16.04 R安装devtools包错误

  • Post author:
  • Post category:其他



devtools包安装错误

> install.packages(‘devtools’)

下载的程序包在 ‘/tmp/RtmpWzR8wU/downloaded_packages’里

Warning messages:

1: In install.packages(“devtools”) :安装程序包‘httpuv’时退出狀態的值不是0

2: In install.packages(“devtools”) : 安装程序包‘gert’时退出狀態的值不是0

3: In install.packages(“devtools”) :安装程序包‘purrr’时退出狀態的值不是0

4: In install.packages(“devtools”) :安装程序包‘shiny’时退出狀態的值不是0

5: In install.packages(“devtools”) :安装程序包‘usethis’时退出狀態的值不是0

6: In install.packages(“devtools”) :安装程序包‘pkgdown’时退出狀態的值不是0

7: In install.packages(“devtools”) :安装程序包‘roxygen2’时退出狀態的值不是0

8: In install.packages(“devtools”) :安装程序包‘miniUI’时退出狀態的值不是0

9: In install.packages(“devtools”) :安装程序包‘devtools’时退出狀態的值不是0



对安装失败的部分单独安装

安装‘gert’

> install.packages(“gert”)

Unknown SSL protocol error in connection to r-lib.github.io:443

完整错误提示如下:

using staged installation
Error in curl::curl_download("https://r-lib.github.io/gert/get-libgit2-linux.sh",  : 
Unknown SSL protocol error in connection to r-lib.github.io:443 
停止执行
Found pkg-config cflags and libs!
Using PKG_CFLAGS=
Using PKG_LIBS=-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
gcc -I"/usr/share/R/include" -DNDEBUG -DR_NO_REMAP -DSTRICT_R_HEADERS    -fvisibility=hidden -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -c branch.c -o branch.o
gcc -I"/usr/share/R/include" -DNDEBUG -DR_NO_REMAP -DSTRICT_R_HEADERS    -fvisibility=hidden -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -c clone.c -o clone.o
clone.c: In function ‘R_git_remote_ls’:
clone.c:441:11: error: too many arguments to function ‘git_remote_connect’
   bail_if(git_remote_connect(remote, GIT_DIRECTION_FETCH, &callbacks, NULL, NUL
           ^
In file included from /usr/include/git2/clone.h:14:0,
                 from /usr/include/git2.h:19,
                 from utils.h:1,
                 from clone.c:10:
/usr/include/git2/remote.h:247:17: note: declared here
 GIT_EXTERN(int) git_remote_connect(git_remote *remote, git_direction direction,
                 ^
/usr/lib/R/etc/Makeconf:169: recipe for target 'clone.o' failed
make: *** [clone.o] Error 1
ERROR: compilation failed for package ‘gert’

隔天又试了一次,结果又安装成功了!!?

using staged installation
Using static libgit2 for Linux x86_64
Using PKG_CFLAGS=-DSTATIC_LIBGIT2 -I/tmp/RtmpuIIqbG/R.INSTALL123c47d56328/gert/libgit2/include
Using PKG_LIBS=-L/tmp/RtmpuIIqbG/R.INSTALL123c47d56328/gert/libgit2/lib -lgit2 -lrt -lpthread -lssh2 -lssl -lcrypto -ldl -lpcre -lz
Configuration OK!
DONE (devtools)



版权声明:本文为m0_61174350原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。