Tôi cố gắng để cài đặt R 3.0.2 devtools
gói trên Ubuntu 14.04 như sau:install.packages ("DevTools") trên R 3.0.2 bị lỗi trong Ubuntu 14.04
install.packages("devtools")
tôi nhận được kết quả như sau :
Installing package into ‘/home/jim/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
Warning: dependency ‘xml2’ is not available
also installing the dependency ‘rversions’
trying URL 'http://cran.rstudio.com/src/contrib/rversions_1.0.1.tar.gz'
Content type 'application/x-gzip' length 4624 bytes
opened URL
==================================================
downloaded 4624 bytes
trying URL 'http://cran.rstudio.com/src/contrib/devtools_1.8.0.tar.gz'
Content type 'application/x-gzip' length 141487 bytes (138 Kb)
opened URL
==================================================
downloaded 138 Kb
ERROR: dependency ‘xml2’ is not available for package ‘rversions’
* removing ‘/home/jim/R/x86_64-pc-linux-gnu-library/3.0/rversions’
ERROR: dependency ‘rversions’ is not available for package ‘devtools’
* removing ‘/home/jim/R/x86_64-pc-linux-gnu-library/3.0/devtools’
The downloaded source packages are in
‘/tmp/RtmpmDzsRJ/downloaded_packages’
Warning messages:
1: In install.packages("devtools") :
installation of package ‘rversions’ had non-zero exit status
2: In install.packages("devtools") :
installation of package ‘devtools’ had non-zero exit status
có vẻ có một sự phụ thuộc vào một gói có tên xml2
. Có ai biết nơi tôi có thể tìm thấy gói này và làm thế nào tôi có thể cài đặt nó.
Tôi đã cài đặt như sau:
sudo apt-get install libxml2-dev
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install libcurl4-gnutls-dev
sudo apt-get install curl
Cài đặt R 3.2.0 từ [repo Ubuntu này trên mỗi gương CRAN] (http://cran.rstudio.com/bin/linux/ubuntu); mọi thứ sẽ rơi vào vị trí. –
sudo apt-get update ... và sau đó sudo apt-get install r-base ... Các gói MỚI sau sẽ được cài đặt: r-base 0 nâng cấp, 1 mới được cài đặt, 0 để loại bỏ và 3 chưa được nâng cấp. Cần lấy 0 B/9,568 B tài liệu lưu trữ. Sau thao tác này, 73,7 kB dung lượng đĩa bổ sung sẽ được sử dụng. Chọn gói r-base chưa được chọn trước đó. (Đang đọc cơ sở dữ liệu ... 201581 tệp và thư mục hiện được cài đặt.) Đang chuẩn bị giải nén .../r-base_3.0.2-1ubuntu1_all.deb ... Mở gói r-base (3.0.2-1ubuntu1) ... Thiết lập r-base (3.0.2-1ubuntu1) ... jim @ Ubuntu14: ~ $ 3.0.2 vẫn đang được cài đặt –
Bạn có thêm mục nhập vào /etc/apt/sources.list như được đề xuất trong liên kết được đăng bởi @DirkEddelbuettel? –