rocker-org / rocker

R configurations for Docker
https://rocker-project.org
GNU General Public License v2.0
1.45k stars 273 forks source link

Unable to install system dependencies #488

Closed paulimer closed 2 years ago

paulimer commented 2 years ago

Hi, Switching my base image (from r-ver:4.0.5 to 4.1.3), I've run into an issue trying to install system dependencies of some R packages (devtools mostly). Those are with the libcurl'-*-dev packages. As I'm not very proficient with apt, I don't know if I can resolve this issue during the building of my container. Is it expected behavior? More details :

With the rocker/r-ver:4.1.3 base image :

The following packages have unmet dependencies:
 libcurl4-gnutls-dev : Conflicts: libcurl4-openssl-dev but 7.68.0-1ubuntu2.7 is to be installed
 libcurl4-openssl-dev : Conflicts: libcurl4-gnutls-dev but 7.68.0-1ubuntu2.7 is to be installed
E: Unable to correct problems, you have held broken packages

Thanks

eitsupi commented 2 years ago

My understanding is that only one of libcurl4-openssl-dev or libcurl4-gnutls-dev can be installed (installing the other will uninstall the other). Please see the following. https://serverfault.com/questions/331794/what-is-the-difference-between-installing-libcurl4-gnutls-dev-or-libcurl4-nss-de

I don't know why your Dockerfile says that, but you need to remove one or the other.

For example, try the following command with debian:latest.

$ apt update && apt install -y --no-install-recommends libcurl4-gnutls-dev libcurl4-openssl-dev
Get:1 http://security.debian.org/debian-security bullseye-security InRelease [44.1 kB]
Get:2 http://security.debian.org/debian-security bullseye-security/main amd64 Packages [123 kB]
Get:3 http://deb.debian.org/debian bullseye InRelease [116 kB]
Get:4 http://deb.debian.org/debian bullseye-updates InRelease [39.4 kB]
Get:5 http://deb.debian.org/debian bullseye/main amd64 Packages [8182 kB]
Get:6 http://deb.debian.org/debian bullseye-updates/main amd64 Packages [2596 B]
Fetched 8507 kB in 3s (3306 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
16 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
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-gnutls-dev : Conflicts: libcurl4-openssl-dev but 7.74.0-1.3+deb11u1 is to be installed
 libcurl4-openssl-dev : Conflicts: libcurl4-gnutls-dev but 7.74.0-1.3+deb11u1 is to be installed
E: Unable to correct problems, you have held broken packages.
paulimer commented 2 years ago

Yes indeed that was it! I gathered dependencies from different sources, leading to this unfortunate collision. Thanks