0

I've been trying to install CUPS using the sudo apt-get install cups command, it won't install, instead I get this error message:

sudo apt-get install cups
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:
 cups : Depends: libcups2 (= 2.2.1-8) but 2.2.3-2 is to be installed
        Depends: libcupscgi1 (>= 1.4.2) but it is not going to be installed
        Depends: libcupsmime1 (>= 1.4.0) but it is not going to be installed
        Depends: libcupsppdc1 (>= 1.4.0) but it is not going to be installed
        Depends: cups-core-drivers (>= 2.2.1-8)
        Depends: cups-daemon (>= 2.2.1-8)
        Depends: cups-ppdc
        Recommends: printer-driver-gutenprint but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I have tried installing the unmet dependencies it prompted, but it still doesn't make any changes. I also ran my sudo apt update, after the update, I again tried it, but it gives the same error message. While checking online for solutions, I stumbled on this: cups : Depends: libcups2 (= 2.1.3-4) but 2.1.3-4ubuntu0.2 is to be installed , did all that was suggested, but non of them helps.

Please can anyone help me out.

I'm using Kali linux (Debian) [4.9.0-kali3-amd64 #1 SMP Debian 4.9.18-1kali1 (2017-04-04) x86_64 GNU/Linux ]

Thank you in advance

3
  • Please add the output of cat /etc/apt/sources.list
    – GAD3R
    Jan 2, 2018 at 7:27
  • cat /etc/apt/sources.list => deb ftp.debian.org/debian stable main contrib non-free
    – antzshrek
    Jan 2, 2018 at 8:06
  • You are using kali and you put the repository of debian. Didn't you find it weird when you were doing this?
    – defalt
    Jan 2, 2018 at 16:50

1 Answer 1

1

Your sources.list should contain only the following line:

deb http://http.kali.org/kali kali-rolling main contrib non-free

The debian repository may break your system , to edit your sources.list use the following command:

echo deb http://http.kali.org/kali kali-rolling main contrib non-free > /etc/apt/sources.list

Then upgrade your package and try to fix the broken dependencies.

apt update ; apt upgrade ; apt dist-upgrade
apt -f install
1
  • Thanks a million! How on earth did you figured out that stunt? That was really awesome!!!
    – antzshrek
    Jan 3, 2018 at 6:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .