I am trying to install rbenv using this guide. To do so the following dependencies are needed:
$ sudo apt install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev
But this is the response I get when try to install them from the terminal:
$ sudo apt install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libreadline-dev' instead of 'libreadline6-dev'
build-essential is already the newest version (12.4ubuntu1).
libgdbm5 is already the newest version (1.14.1-6).
zlib1g-dev is already the newest version (1:1.2.11.dfsg-0ubuntu2).
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:
libncurses5-dev : Depends: libtinfo5 (= 6.1-1ubuntu1) but 6.1-1ubuntu1.18.04 is to be installed
Depends: libncurses5 (= 6.1-1ubuntu1) but 6.1-1ubuntu1.18.04 is to be installed
Depends: libtinfo-dev (= 6.1-1ubuntu1) but it is not going to be installed
libreadline-dev : Depends: libtinfo-dev but it is not going to be installed
libssl-dev : Depends: libssl1.1 (= 1.1.0g-2ubuntu4) but 1.1.0g-2ubuntu4.1 is to be installed
E: Unable to correct problems, you have held broken packages.
Seems like I have some broken packages installed, but i'm not really sure. How could I solve this issue?
sudo apt install -f
?apt-cache policy libncurses5-dev
(packages.ubuntu.com/search?keywords=libncurses5-dev, packages.ubuntu.com/search?keywords=libssl-dev) - it does look like you are using the original (not updated) version. Do you have the 'bionic-updates' 'bionic-security' lines in your sources? It'd also be nice if you told us you are using 18.04 LTS, instead of us guessing by package versions