在Ubuntu虚拟机中安装devtools包

5

我尝试在Ubuntu 16.04虚拟机中安装devtools软件包,但失败了。

我成功安装了其他软件包。

然而,我无法安装它,控制台中的过程如下:

> install.packages("devtools")
Installing package into ‘/home/stefan/R/x86_64-pc-linux-gnu-library/3.2’
(as ‘lib’ is unspecified)
also installing the dependencies ‘curl’, ‘openssl’, ‘httr’, ‘git2r’

--2018-01-26 22:14:08--  https://cran.rstudio.com/src/contrib/curl_3.1.tar.gz
Resolving cran.rstudio.com (cran.rstudio.com)... 54.230.27.181
Connecting to cran.rstudio.com (cran.rstudio.com)|54.230.27.181|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 366086 (358K) [application/x-gzip]
Saving to: ‘/tmp/RtmpIF4wAz/downloaded_packages/curl_3.1.tar.gz’

     0K .......... .......... .......... .......... .......... 13% 1017K 0s
    50K .......... .......... .......... .......... .......... 27% 1,62M 0s
   100K .......... .......... .......... .......... .......... 41% 1,32M 0s
   150K .......... .......... .......... .......... .......... 55% 4,09M 0s
   200K .......... .......... .......... .......... .......... 69% 4,59M 0s
   250K .......... .......... .......... .......... .......... 83% 12,0M 0s
   300K .......... .......... .......... .......... .......... 97% 2,84M 0s
   350K .......                                               100% 19,6M=0,2s

2018-01-26 22:14:09 (2,18 MB/s) - ‘/tmp/RtmpIF4wAz/downloaded_packages/curl_3.1.tar.gz’ saved [366086/366086]

--2018-01-26 22:14:09--  https://cran.rstudio.com/src/contrib/openssl_0.9.9.tar.gz
Resolving cran.rstudio.com (cran.rstudio.com)... 54.230.27.181
Connecting to cran.rstudio.com (cran.rstudio.com)|54.230.27.181|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1112927 (1,1M) [application/x-gzip]
Saving to: ‘/tmp/RtmpIF4wAz/downloaded_packages/openssl_0.9.9.tar.gz’

     0K .......... .......... .......... .......... ..........  4% 1,02M 1s
    50K .......... .......... .......... .......... ..........  9%  194K 3s
   100K .......... .......... .......... .......... .......... 13%  215K 3s
   150K .......... .......... .......... .......... .......... 18%  227K 3s
   200K .......... .......... .......... .......... .......... 23% 10,2M 3s
   250K .......... .......... .......... .......... .......... 27%  253K 3s
   300K .......... .......... .......... .......... .......... 32%  271K 2s
   350K .......... .......... .......... .......... .......... 36%  289K 2s
   400K .......... .......... .......... .......... .......... 41%  317K 2s
   450K .......... .......... .......... .......... .......... 46% 3,97M 2s
   500K .......... .......... .......... .......... .......... 50%  338K 2s
   550K .......... .......... .......... .......... .......... 55%  346K 1s
   600K .......... .......... .......... .......... .......... 59%  372K 1s
   650K .......... .......... .......... .......... .......... 64% 5,58M 1s
   700K .......... .......... .......... .......... .......... 69%  317K 1s
   750K .......... .......... .......... .......... .......... 73%  315K 1s
   800K .......... .......... .......... .......... .......... 78%  344K 1s
   850K .......... .......... .......... .......... .......... 82%  344K 1s
   900K .......... .......... .......... .......... .......... 87% 6,08M 0s
   950K .......... .......... .......... .......... .......... 92%  404K 0s
  1000K .......... .......... .......... .......... .......... 96%  567K 0s
  1050K .......... .......... .......... ......               100% 7,47M=2,8s

2018-01-26 22:14:13 (394 KB/s) - ‘/tmp/RtmpIF4wAz/downloaded_packages/openssl_0.9.9.tar.gz’ saved [1112927/1112927]

--2018-01-26 22:14:13--  https://cran.rstudio.com/src/contrib/httr_1.3.1.tar.gz
Resolving cran.rstudio.com (cran.rstudio.com)... 54.230.27.181
Connecting to cran.rstudio.com (cran.rstudio.com)|54.230.27.181|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 147593 (144K) [application/x-gzip]
Saving to: ‘/tmp/RtmpIF4wAz/downloaded_packages/httr_1.3.1.tar.gz’

     0K .......... .......... .......... .......... .......... 34%  934K 0s
    50K .......... .......... .......... .......... .......... 69%  100K 0s
   100K .......... .......... .......... .......... ....      100%  342K=0,7s

2018-01-26 22:14:15 (212 KB/s) - ‘/tmp/RtmpIF4wAz/downloaded_packages/httr_1.3.1.tar.gz’ saved [147593/147593]

--2018-01-26 22:14:15--  https://cran.rstudio.com/src/contrib/git2r_0.21.0.tar.gz
Resolving cran.rstudio.com (cran.rstudio.com)... 54.230.27.181
Connecting to cran.rstudio.com (cran.rstudio.com)|54.230.27.181|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1155512 (1,1M) [application/x-gzip]
Saving to: ‘/tmp/RtmpIF4wAz/downloaded_packages/git2r_0.21.0.tar.gz’

     0K .......... .......... .......... .......... ..........  4% 1,06M 1s
    50K .......... .......... .......... .......... ..........  8% 1,52M 1s
   100K .......... .......... .......... .......... .......... 13% 1,28M 1s
   150K .......... .......... .......... .......... .......... 17% 1,54M 1s
   200K .......... .......... .......... .......... .......... 22% 6,96M 1s
   250K .......... .......... .......... .......... .......... 26% 1,10M 1s
   300K .......... .......... .......... .......... .......... 31% 1,21M 1s
   350K .......... .......... .......... .......... .......... 35%  940K 1s
   400K .......... .......... .......... .......... .......... 39% 1,72M 0s
   450K .......... .......... .......... .......... .......... 44% 5,84M 0s
   500K .......... .......... .......... .......... .......... 48% 1,38M 0s
   550K .......... .......... .......... .......... .......... 53% 2,17M 0s
   600K .......... .......... .......... .......... .......... 57% 2,20M 0s
   650K .......... .......... .......... .......... .......... 62% 5,09M 0s
   700K .......... .......... .......... .......... .......... 66% 2,36M 0s
   750K .......... .......... .......... .......... .......... 70% 3,40M 0s
   800K .......... .......... .......... .......... .......... 75% 1,73M 0s
   850K .......... .......... .......... .......... .......... 79% 2,03M 0s
   900K .......... .......... .......... .......... .......... 84% 42,4M 0s
   950K .......... .......... .......... .......... .......... 88% 2,49M 0s
  1000K .......... .......... .......... .......... .......... 93% 1,68M 0s
  1050K .......... .......... .......... .......... .......... 97% 3,40M 0s
  1100K .......... .......... ........                        100% 83,9M=0,6s

2018-01-26 22:14:16 (1,93 MB/s) - ‘/tmp/RtmpIF4wAz/downloaded_packages/git2r_0.21.0.tar.gz’ saved [1155512/1155512]

--2018-01-26 22:14:16--  https://cran.rstudio.com/src/contrib/devtools_1.13.4.tar.gz
Resolving cran.rstudio.com (cran.rstudio.com)... 54.230.27.181
Connecting to cran.rstudio.com (cran.rstudio.com)|54.230.27.181|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 486348 (475K) [application/x-gzip]
Saving to: ‘/tmp/RtmpIF4wAz/downloaded_packages/devtools_1.13.4.tar.gz’

     0K .......... .......... .......... .......... .......... 10% 1,10M 0s
    50K .......... .......... .......... .......... .......... 21% 1,40M 0s
   100K .......... .......... .......... .......... .......... 31% 1,54M 0s
   150K .......... .......... .......... .......... .......... 42% 1,72M 0s
   200K .......... .......... .......... .......... .......... 52% 2,99M 0s
   250K .......... .......... .......... .......... .......... 63% 1,54M 0s
   300K .......... .......... .......... .......... .......... 73%  867K 0s
   350K .......... .......... .......... .......... .......... 84% 2,16M 0s
   400K .......... .......... .......... .......... .......... 94% 3,66M 0s
   450K .......... .......... ....                            100% 8,73M=0,3s

2018-01-26 22:14:17 (1,63 MB/s) - ‘/tmp/RtmpIF4wAz/downloaded_packages/devtools_1.13.4.tar.gz’ saved [486348/486348]

* installing *source* package ‘curl’ ...
** package ‘curl’ successfully unpacked and MD5 sums checked
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcurl' found
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcurl' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lcurl
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libcurl was not found. Try installing:
 * deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
 * rpm: libcurl-devel (Fedora, CentOS, RHEL)
 * csw: libcurl_dev (Solaris)
If libcurl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libcurl.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: configuration failed for package ‘curl’
* removing ‘/home/stefan/R/x86_64-pc-linux-gnu-library/3.2/curl’
Warning in install.packages :
  installation of package ‘curl’ had non-zero exit status
* installing *source* package ‘openssl’ ...
** package ‘openssl’ successfully unpacked and MD5 sums checked
Using PKG_CFLAGS=
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because openssl was not found. Try installing:
 * deb: libssl-dev (Debian, Ubuntu, etc)
 * rpm: openssl-devel (Fedora, CentOS, RHEL)
 * csw: libssl_dev (Solaris)
 * brew: openssl@1.1 (Mac OSX)
If openssl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a openssl.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: configuration failed for package ‘openssl’
* removing ‘/home/stefan/R/x86_64-pc-linux-gnu-library/3.2/openssl’
Warning in install.packages :
  installation of package ‘openssl’ had non-zero exit status
* installing *source* package ‘git2r’ ...
** package ‘git2r’ successfully unpacked and MD5 sums checked
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking size of void*... 8
checking for library containing inflate... -lz
checking for library containing EVP_EncryptInit... no
checking for openssl... no
configure: error: in `/tmp/RtmpQ9e11v/R.INSTALL82977388520/git2r':
configure: error: 
  ---------------------------------------------
   The OpenSSL library that is required to
   build git2r was not found.

   Please install:
     libssl-dev    (package on e.g. Debian and Ubuntu)
     openssl-devel (package on e.g. Fedora, CentOS and RHEL)
     openssl       (Homebrew package on OS X)
   and try again.

   If the OpenSSL library is installed on
   your system but the git2r configuration
   is unable to find it, you can specify
   the include and lib path to OpenSSL with:
   R CMD INSTALL --configure-args='--with-libssl-include=INCLUDE_PATH --with-libssl-lib=LIB_PATH' git2r
  ---------------------------------------------
See `config.log' for more details
ERROR: configuration failed for package ‘git2r’
* removing ‘/home/stefan/R/x86_64-pc-linux-gnu-library/3.2/git2r’
Warning in install.packages :
  installation of package ‘git2r’ had non-zero exit status
ERROR: dependencies ‘curl’, ‘openssl’ are not available for package ‘httr’
* removing ‘/home/stefan/R/x86_64-pc-linux-gnu-library/3.2/httr’
Warning in install.packages :
  installation of package ‘httr’ had non-zero exit status
ERROR: dependencies ‘httr’, ‘git2r’ are not available for package ‘devtools’
* removing ‘/home/stefan/R/x86_64-pc-linux-gnu-library/3.2/devtools’
Warning in install.packages :
  installation of package ‘devtools’ had non-zero exit status

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

你知道怎么安装吗?如果我使用终端运行R,而不是使用Rstudio,问题仍然存在。

从GitHub安装car包时,由于无法在“工具”->“安装包”列表中找到它,会出现问题:

> library(devtools)
> install_github("cran/car")
Downloading GitHub repo cran/car@master
from URL https://api.github.com/repos/cran/car/zipball/master
Installing car
--2018-01-26 22:39:07--  https://cran.rstudio.com/src/contrib/pbkrtest_0.4-7.tar.gz
Resolving cran.rstudio.com (cran.rstudio.com)... 54.230.27.181
Connecting to cran.rstudio.com (cran.rstudio.com)|54.230.27.181|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 156406 (153K) [application/x-gzip]
Saving to: ‘/tmp/RtmpIF4wAz/pbkrtest_0.4-7.tar.gz’

     0K .......... .......... .......... .......... .......... 32% 1,16M 0s
    50K .......... .......... .......... .......... .......... 65% 1,45M 0s
   100K .......... .......... .......... .......... .......... 98% 3,79M 0s
   150K ..                                                    100% 8,52M=0,09s

2018-01-26 22:39:07 (1,68 MB/s) - ‘/tmp/RtmpIF4wAz/pbkrtest_0.4-7.tar.gz’ saved [156406/156406]

Installing pbkrtest
--2018-01-26 22:39:11--  https://cran.rstudio.com/src/contrib/lme4_1.1-15.tar.gz
Resolving cran.rstudio.com (cran.rstudio.com)... 54.230.27.181
Connecting to cran.rstudio.com (cran.rstudio.com)|54.230.27.181|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3610706 (3,4M) [application/x-gzip]
Saving to: ‘/tmp/RtmpIF4wAz/lme4_1.1-15.tar.gz’

     0K .......... .......... .......... .......... ..........  1% 1,05M 3s
    50K .......... .......... .......... .......... ..........  2% 1,52M 3s
   100K .......... .......... .......... .......... ..........  4% 3,40M 2s
   150K .......... .......... .......... .......... ..........  5% 1,36M 2s
   200K .......... .......... .......... .......... ..........  7% 3,97M 2s
   250K .......... .......... .......... .......... ..........  8% 15,4M 2s
   300K .......... .......... .......... .......... ..........  9% 2,23M 2s
   350K .......... .......... .......... .......... .......... 11% 65,5M 1s
   400K .......... .......... .......... .......... .......... 12% 3,85M 1s
   450K .......... .......... .......... .......... .......... 14% 60,4M 1s
   500K .......... .......... .......... .......... .......... 15% 79,4M 1s
   550K .......... .......... .......... .......... .......... 17% 6,83M 1s
   600K .......... .......... .......... .......... .......... 18% 2,60M 1s
   650K .......... .......... .......... .......... .......... 19% 4,68M 1s
   700K .......... .......... .......... .......... .......... 21% 83,6M 1s
   750K .......... .......... .......... .......... .......... 22% 91,2M 1s
   800K .......... .......... .......... .......... .......... 24% 96,8M 1s
   850K .......... .......... .......... .......... .......... 25% 4,27M 1s
   900K .......... .......... .......... .......... .......... 26% 91,6M 1s
   950K .......... .......... .......... .......... .......... 28% 1,39M 1s
  1000K .......... .......... .......... .......... .......... 29% 3,98M 1s
  1050K .......... .......... .......... .......... .......... 31% 27,1M 1s
  1100K .......... .......... .......... .......... .......... 32% 91,8M 1s
  1150K .......... .......... .......... .......... .......... 34% 86,4M 1s
  1200K .......... .......... .......... .......... .......... 35% 3,19M 1s
  1250K .......... .......... .......... .......... .......... 36% 5,66M 1s
  1300K .......... .......... .......... .......... .......... 38% 43,6M 0s
  1350K .......... .......... .......... .......... .......... 39% 86,1M 0s
  1400K .......... .......... .......... .......... .......... 41% 5,28M 0s
  1450K .......... .......... .......... .......... .......... 42% 16,6M 0s
  1500K .......... .......... .......... .......... .......... 43% 9,84M 0s
  1550K .......... .......... .......... .......... .......... 45% 3,84M 0s
  1600K .......... .......... .......... .......... .......... 46% 4,36M 0s
  1650K .......... .......... .......... .......... .......... 48% 19,5M 0s
  1700K .......... .......... .......... .......... .......... 49% 4,09M 0s
  1750K .......... .......... .......... .......... .......... 51% 84,7M 0s
  1800K .......... .......... .......... .......... .......... 52% 1,32M 0s
  1850K .......... .......... .......... .......... .......... 53%  104M 0s
  1900K .......... .......... .......... .......... .......... 55% 14,4M 0s
  1950K .......... .......... .......... .......... .......... 56% 23,1M 0s
  2000K .......... .......... .......... .......... .......... 58% 3,18M 0s
  2050K .......... .......... .......... .......... .......... 59% 2,28M 0s
  2100K .......... .......... .......... .......... .......... 60%  103M 0s
  2150K .......... .......... .......... .......... .......... 62% 2,08M 0s
  2200K .......... .......... .......... .......... .......... 63% 13,6M 0s
  2250K .......... .......... .......... .......... .......... 65% 3,23M 0s
  2300K .......... .......... .......... .......... .......... 66% 4,50M 0s
  2350K .......... .......... .......... .......... .......... 68% 13,9M 0s
  2400K .......... .......... .......... .......... .......... 69% 98,1M 0s
  2450K .......... .......... .......... .......... .......... 70% 42,6M 0s
  2500K .......... .......... .......... .......... .......... 72% 4,12M 0s
  2550K .......... .......... .......... .......... .......... 73% 17,2M 0s
  2600K .......... .......... .......... .......... .......... 75% 73,7M 0s
  2650K .......... .......... .......... .......... .......... 76% 94,0M 0s
  2700K .......... .......... .......... .......... .......... 77%  102M 0s
  2750K .......... .......... .......... .......... .......... 79% 80,8M 0s
  2800K .......... .......... .......... .......... .......... 80%  101M 0s
  2850K .......... .......... .......... .......... .......... 82% 3,39M 0s
  2900K .......... .......... .......... .......... .......... 83% 89,8M 0s
  2950K .......... .......... .......... .......... .......... 85% 88,7M 0s
  3000K .......... .......... .......... .......... .......... 86% 82,8M 0s
  3050K .......... .......... .......... .......... .......... 87% 7,12M 0s
  3100K .......... .......... .......... .......... .......... 89% 80,9M 0s
  3150K .......... .......... .......... .......... .......... 90% 79,9M 0s
  3200K .......... .......... .......... .......... .......... 92% 7,38M 0s
  3250K .......... .......... .......... .......... .......... 93%  100M 0s
  3300K .......... .......... .......... .......... .......... 95% 88,2M 0s
  3350K .......... .......... .......... .......... .......... 96% 9,04M 0s
  3400K .......... .......... .......... .......... .......... 97% 11,9M 0s
  3450K .......... .......... .......... .......... .......... 99% 99,2M 0s
  3500K .......... .......... ......                          100% 97,2M=0,6s

2018-01-26 22:39:12 (6,14 MB/s) - ‘/tmp/RtmpIF4wAz/lme4_1.1-15.tar.gz’ saved [3610706/3610706]

Installing lme4
--2018-01-26 22:39:20--  https://cran.rstudio.com/src/contrib/nloptr_1.0.4.tar.gz
Resolving cran.rstudio.com (cran.rstudio.com)... 54.230.27.181
Connecting to cran.rstudio.com (cran.rstudio.com)|54.230.27.181|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 353957 (346K) [application/x-gzip]
Saving to: ‘/tmp/RtmpIF4wAz/nloptr_1.0.4.tar.gz’

     0K .......... .......... .......... .......... .......... 14% 1,11M 0s
    50K .......... .......... .......... .......... .......... 28%  106K 1s
   100K .......... .......... .......... .......... .......... 43%  644K 1s
   150K .......... .......... .......... .......... .......... 57%  677K 0s
   200K .......... .......... .......... .......... .......... 72% 5,64M 0s
   250K .......... .......... .......... .......... .......... 86%  628K 0s
   300K .......... .......... .......... .......... .....     100% 2,39M=0,8s

2018-01-26 22:39:22 (448 KB/s) - ‘/tmp/RtmpIF4wAz/nloptr_1.0.4.tar.gz’ saved [353957/353957]

Installing nloptr
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL  \
  '/tmp/RtmpIF4wAz/devtools756410ec724/nloptr' --library='/home/stefan/R/x86_64-pc-linux-gnu-library/3.2' --install-tests 

ERROR: failed to lock directory ‘/home/stefan/R/x86_64-pc-linux-gnu-library/3.2’ for modifying
Try removing ‘/home/stefan/R/x86_64-pc-linux-gnu-library/3.2/00LOCK-nloptr’
Installation failed: Command failed (3)
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL '/tmp/RtmpIF4wAz/devtools7561eb5da54/lme4'  \
  --library='/home/stefan/R/x86_64-pc-linux-gnu-library/3.2' --install-tests 

ERROR: dependency ‘nloptr’ is not available for package ‘lme4’
* removing ‘/home/stefan/R/x86_64-pc-linux-gnu-library/3.2/lme4’
Installation failed: Command failed (1)
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL  \
  '/tmp/RtmpIF4wAz/devtools75623bf595c/pbkrtest' --library='/home/stefan/R/x86_64-pc-linux-gnu-library/3.2' --install-tests 

ERROR: dependency ‘lme4’ is not available for package ‘pbkrtest’
* removing ‘/home/stefan/R/x86_64-pc-linux-gnu-library/3.2/pbkrtest’
Installation failed: Command failed (1)
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL  \
  '/tmp/RtmpIF4wAz/devtools75635e8f138/cran-car-4f39fce' --library='/home/stefan/R/x86_64-pc-linux-gnu-library/3.2' --install-tests 

ERROR: dependency ‘pbkrtest’ is not available for package ‘car’
* removing ‘/home/stefan/R/x86_64-pc-linux-gnu-library/3.2/car’
Installation failed: Command failed (1)
4个回答

11

当然,答案就在您粘贴的输出中。您需要在操作系统中安装以下依赖项(而不是在R中):

libcurl4-openssl-dev libssl-dev

要安装它们,请在终端中运行:

sudo apt-get update
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install libssl-dev

然后前往 R 并尝试重新安装 "devtools"。


我问这个问题是因为我也遇到了安装car包的问题,我在列表中找不到它,所以我尝试了github选项,但还是不起作用。在进行了您提到的devtools安装之后,任何提示都对我非常有帮助。 - HelenVcl
我从devtools的输出中理解了它,但这只是因为rcurl和git2r两个依赖项直接告诉我们在操作系统中找不到哪些库。 这并不是常态,而是例外。大多数软件包都会让你束手无策。 - Nicolás Velasquez PhD
谢谢,我明白了。你有关于车辆包的跟踪想法吗?因为这是我尝试使用 devtools 安装的包。 - HelenVcl
3个问题帮助您解决问题:
  1. 您确定car没有与整个R软件包一起默认安装吗?在干净的R安装上运行library(car)时会发生什么?
  2. 您正在运行哪个版本的R?
  3. 您是否在Ubuntu中同时安装了r-base-dev和r-base?
- Nicolás Velasquez PhD
我明白了... 如果你在R的控制台中运行install.packages('car')会发生什么呢? 我刚刚在一个全新安装的lubuntu虚拟机上运行了它,它可以正常工作。 - Nicolás Velasquez PhD
显示剩余3条评论

3

这在Kali Linux中也适用,其他基于Debian的Linux发行版应该也同样适用。 - Phenomniverse

1

猜测您需要加上sudo apt-get install libxml2-dev。这是因为devtools也需要xml2软件包。


0

对于我来说,Ubuntu 18.04可行:

apt-get install libzmq3-dev libharfbuzz-dev libfribidi-dev libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev build-essential libcurl4-openssl-dev libxml2-dev libssl-dev libfontconfig1-dev

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接