Mes versions Ubuntu et 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
Sous R, avec Ubuntu, lorsque j’ai essayé d’installer 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()
Donc, quand j'ai essayé d'installer libcurl4
, mon arbre de dépendance a tout gâché:
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.
J'ai essayé:
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
Cela n'a pas fonctionné alors je nettoie:
alvas@ubi:~$ Sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
Et puis j'ai fait ça:
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
J'ai donc essayé d'installer la dépendance:
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.
Comment puis-je résoudre l'arborescence des dépendances modifiées afin d'installer readr
in R avec succès?
Chaque fois que vous avez un problème de dépendance, exécutez:
Sudo apt-get install -f
Maintenant, pour installer readr
dans R, et dans le cas d'Ubuntu 16.04 et R version 3.2.3 (2015-12-10), je devais effectuer les opérations suivantes:
Sudo apt-get install libcurl3
Sudo apt-get install libcurl4-gnutls-dev
Les deux commandes suivantes ont résolu mon problème
apt-get -y build-dep libcurl4-gnutls-dev apt-get -y install libcurl4-gnutls-dev