Моя Ubuntu и версии R:
alvas@ubi:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty
alvas@ubi:~$ R
> version
_
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 3
minor 2.2
year 2015
month 08
day 14
svn rev 69053
language R
version.string R version 3.2.2 (2015-08-14)
nickname Fire Safety
В R, с помощью Ubuntu, когда я пытался установить readr
:
> install.packages('readr')
Installing package into ‘/home/alvas/R/x86_64-pc-linux-gnu-library/3.2’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
also installing the dependency ‘curl’
trying URL 'https://mirrors.ebi.ac.uk/CRAN/src/contrib/curl_0.9.4.tar.gz'
Content type 'application/x-gzip' length 245598 bytes (239 KB)
==================================================
downloaded 239 KB
trying URL 'https://mirrors.ebi.ac.uk/CRAN/src/contrib/readr_0.2.2.tar.gz'
Content type 'application/x-gzip' length 146554 bytes (143 KB)
==================================================
downloaded 143 KB
* 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/alvas/R/x86_64-pc-linux-gnu-library/3.2/curl’
ERROR: dependency ‘curl’ is not available for package ‘readr’
* removing ‘/home/alvas/R/x86_64-pc-linux-gnu-library/3.2/readr’
The downloaded source packages are in
‘/tmp/Rtmp2Ke6na/downloaded_packages’
Warning messages:
1: In install.packages("readr") :
installation of package ‘curl’ had non-zero exit status
2: In install.packages("readr") :
installation of package ‘readr’ had non-zero exit status
> q()
Таким образом, когда я пытался установить libcurl4
, Так или иначе мое дерево зависимостей, завинченное:
alvas@ubi:~$ sudo apt-get install libcurl4-openssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libcurl4-openssl-dev : Depends: libcurl3 (= 7.35.0-1ubuntu2) but 7.35.0-1ubuntu2.5 is to be installed
Depends: libkrb5-dev but it is not going to be installed
Depends: librtmp-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Я попробовал:
alvas@ubi:~$ sudo apt-get -y build-dep libcurl4-openssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Picking 'curl' as source package instead of 'libcurl4-openssl-dev'
E: Unable to find a source package for curl
Это не работало так, я убираю:
alvas@ubi:~$ sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
И затем я сделал это:
alvas@ubi:~$ sudo apt-get install libcurl4-openssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libcurl4-openssl-dev : Depends: libcurl3 (= 7.35.0-1ubuntu2) but 7.35.0-1ubuntu2.5 is to be installed
Depends: libkrb5-dev but it is not going to be installed
Depends: librtmp-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages
Таким образом, я пытался установить зависимость:
alvas@ubi:~$ sudo apt-get install librtmp-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
librtmp-dev : Depends: libgnutls-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Как я могу разрешить грязное дерево зависимостей, чтобы установить readr
в R успешно?
Каждый раз, когда Вы имеете проблему зависимости, работаете:
sudo apt-get install -f
Теперь, для установки readr
в R, и для случая версии 3.2.3 (2015-12-10) Ubuntu 16.04 и R я должен был сделать следующее:
sudo apt-get install libcurl3
sudo apt-get install libcurl4-gnutls-dev
Следующие две команды решили мою проблему
apt-get -y build-dep libcurl4-gnutls-dev
apt-get -y install libcurl4-gnutls-dev