Debian APT unable to install any package [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 5 years ago.
Improve this question
I am running Debian 9 with XFCE4 on Dell XPS 15 (9560). Recently I ran into trouble with apt. If I try to run anything using apt-get install, the following always return:
william#debian:~$ sudo apt-get install vim
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:
vim : Depends: vim-common (= 2:7.4.488-7+deb8u3) but 2:8.0.0197-4+deb9u1 is to be installed
E: Unable to correct problems, you have held broken packages.
I have tried running sudo apt-get update, sudo apt-get upgrade, sudo apt --fix-broken install, sudo apt-get clean, and etc, etc.
Some of them return messages like this:
william#debian:~$ sudo apt-get update
Ign:1 http://ftp.us.debian.org/debian jessie InRelease
Hit:2 http://ftp.us.debian.org/debian jessie Release
Reading package lists... Done
william#debian:~$ sudo apt-get install upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package upgrade
william#debian:~$ sudo apt-get install dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package dist-upgrade
Please help and thanks a lot :)

Please update your sources.list file......
Use terminal and open using permission
$ sudo gedit /etc/apt/sources.list
Paste the links here , you can find them on internet
Or paste these :
deb http://deb.debian.org/debian stretch main
deb-src http://deb.debian.org/debian stretch main
deb http://deb.debian.org/debian stretch-updates main
deb-src http://deb.debian.org/debian stretch-updates main
deb http://security.debian.org/debian-security/ stretch/updates main
deb-src http://security.debian.org/debian-security/ stretch/updates main
Thanku for asking amd sorry if im wrong somewhere šŸ˜Š

Related

a lot of vlc packages and others (24 packages) is no upgraded in kali linux [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 days ago.
Improve this question
I am trying to update the packages in kali linux , I tried almost EVERYTHING to achieve that , but nothing worked
so when I run : sudo apt update
I am getting :
Hit:1 http://www.deb-multimedia.org buster InRelease Hit:2 https://dl.google.com/linux/chrome/deb stable InRelease Hit:3 https://mirrors.dotsrc.org/kali kali-rolling InRelease Reading package lists... Done Building dependency tree... Done Reading state information... Done 24 packages can be upgraded. Run 'apt list --upgradable' to see them.
and when I run : sudo apt upgrade , those are the packages that is not updated :
Reading package lists... Done Building dependency tree... Done Reading state information... Done Calculating upgrade... Done The following packages have been kept back: **ffmpeg gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly libasound2-plugins libchromaprint1 libgstreamer-plugins-bad1.0-0 librtmp1 libvlc-bin libvlc5 libvlccore9 phonon4qt5-backend-vlc vlc vlc-bin vlc-data vlc-l10n vlc-plugin-access-extra vlc-plugin-base vlc-plugin-notify vlc-plugin-qt vlc-plugin-samba vlc-plugin-skins2 vlc-plugin-video-output vlc-plugin-video-splitter vlc-plugin-visualization** 0 upgraded, 0 newly installed, 0 to remove and 24 not upgraded.
I tried:
sudo apt-get update sudo apt-get upgrade sudo apt update sudo apt upgrade sudo apt upgrade --fix-missing sudo apt --fix-broken install apt-get dist-upgrade
and nothing worked , I still have 24 not upgraded
I tried even to added some extra lines in nano /etc/apt/sources.list
deb https://http.kali.org/kali/ kali-rolling main contrib non-free deb-src https://http.kali.org/kali kali-rolling main contrib non-free
and even this one didn't work
after that I tried to follow some videos on youtube , nothing worked
I mean if you take a look at the packages , they are just vlc packages ! and some plugins
Could anyone help me with this ? Thx in advance
as I said , I tried almost everything

Cannot apt upgrade or install due to unmet dependencies error [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
OS and version: Pop!_OS 21.04
Whenever I try to install a new package/upgrade, I see the following error:
sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libc6 : Breaks: libc6:i386 (!= 2.33-0ubuntu5) but 2.34-0ubuntu3 is installed
libc6:i386 : Breaks: libc6 (!= 2.34-0ubuntu3) but 2.33-0ubuntu5 is installed
locales : Depends: libc-bin (> 2.34)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Things I have tried:
1. apt --fix-broken install
sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
libc6 : Breaks: libc6:i386 (!= 2.33-0ubuntu5) but 2.34-0ubuntu3 is installed
libc6:i386 : Breaks: libc6 (!= 2.34-0ubuntu3) but 2.33-0ubuntu5 is installed
locales : Depends: libc-bin (> 2.34)
E: Error, pkgProblemResolver::Resolve generated breaks; this may be caused by held packages.
E: Unable to correct dependencies
2. Following the steps of a similar post: https://askubuntu.com/questions/1315906/unmet-dependencies-libc6-the-package-system-is-broken
sudo apt update output
Hit:1 http://apt.pop-os.org/proprietary hirsute InRelease
Hit:2 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu hirsute InRelease
Hit:4 http://us.archive.ubuntu.com/ubuntu hirsute-security InRelease
Hit:5 http://ppa.launchpad.net/papirus/papirus/ubuntu hirsute InRelease
Hit:6 http://us.archive.ubuntu.com/ubuntu hirsute-updates InRelease
Hit:7 https://packages.microsoft.com/repos/ms-teams stable InRelease
Hit:8 http://us.archive.ubuntu.com/ubuntu hirsute-backports InRelease
Hit:9 http://ppa.launchpad.net/system76/pop/ubuntu hirsute InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
23 packages can be upgraded. Run 'apt list --upgradable' to see them.
I'm new to Linux, and am pretty stuck at the moment. Any help would be tremendous. Thanks!

ā€œE: Unable to locate package python3-pipā€ in Debian 10

For installing pip3 I am following apt update process.
But I am getting output in terminal:
$ sudo apt-get update
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python3-pip
Tried all available solutions on stackoverflow.
Please suggest any solutions.
Sometimes the sources.list file is not configured properly, so if none of solutions work than try this:
Type in terminal, gedit etc/apt/sources.list. A file will open, check if these given lines are present or not in that file:
deb http://deb.debian.org/debian buster main
deb-src http://deb.debian.org/debian buster main
deb http://deb.debian.org/debian-security/ buster/updates main
deb-src http://deb.debian.org/debian-security/ buster/updates main
deb http://deb.debian.org/debian buster-updates main
deb-src http://deb.debian.org/debian buster-updates main
In my case these were missing, this means the apt-get command had no mirrors configured to pull and update packages. These lines are the links to Debian repositories from where packages are pulled.
Copy and paste these lines into that file and save and close it.
Now run sudo apt-get update and than run sudo apt-get upgrade. Once process finishes run sudo apt-get install -y python3-pip. This will install pip3 without any error.
Please run an update and upgrade,
sudo apt update && sudo apt upgrade
Hopefully, this will fix the issue. if this doesn't work you can always update the source list manually.

E: Unable to locate package ros-kinetic-desktop-full on Ubuntu 16.04

I know that there are already several questions similar to this, but none of its solutions worked for me. Hence, after a lot of web searching and trying out different stuff, I simply decided to open a Stack Overflow question myself.
Basically, I had ROS Kinetic working on my Ubuntu 16.04 machine and it suddenly started giving me several errors when I tried to build my catkin workspace. After trying several stuff, I decided to uninstall ROS with sudo apt-get remove ros-* and install it again, according to the tutorial http://wiki.ros.org/kinetic/Installation/Ubuntu.
I leave below the full execution of the installation commands:
tomas#tomas-TOSHIBA:~ $ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
tomas#tomas-TOSHIBA:~ $ sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
Executing: /tmp/tmp.plh6QKA5mU/gpg.1.sh --keyserver
hkp://keyserver.ubuntu.com:80
--recv-key
C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
gpg: requesting key AB17C654 from hkp server keyserver.ubuntu.com
gpg: key AB17C654: "Open Robotics <info#osrfoundation.org>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
tomas#tomas-TOSHIBA:~ $ sudo apt-get update
Hit:1 http://pt.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://pt.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:3 http://pt.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Hit:4 http://ppa.launchpad.net/atareao/atareao/ubuntu xenial InRelease
Hit:5 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial InRelease
Hit:6 https://brave-browser-apt-release.s3.brave.com stable InRelease
Get:7 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Hit:8 http://packages.ros.org/ros/ubuntu xenial InRelease
Fetched 325 kB in 6s (50.3 kB/s)
Reading package lists... Done
tomas#tomas-TOSHIBA:~ $ sudo apt-get install ros-kinetic-desktop-full
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ros-kinetic-desktop-full
I already tried using curl and the different links they suggest on the tutorial to setup my keys, but the end result was the same. If I try sudo apt-get install ros-desktop-full, I get:
tomas#tomas-TOSHIBA:~ $ sudo apt-get install ros-desktop-full
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.
ros-desktop-full : Depends: ros-desktop but it is not going to be installed
Depends: ros-perception but it is not going to be installed
Depends: ros-simulators but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Running sudo aptitude install ros-desktop-full also did not work. If I execute sudo apt-get install ros-desktop, it says that ros-desktop has unmet dependencies. If I try to install those dependencies, they also have unmet dependencies.
Would really appreciate if anyone could help me. Thanks!
For all those suffering from the same problem, I was not able to solve it and ended up reinstalling Ubuntu on my computer. After this, everything worked correctly.
My advice would be to just reinstall Ubuntu right away, I would have lost less time if I had done it immediately.

Installing npm in Ubuntu

I am truly struggling to install npm. I have installed the nodejs package successfully, but still my operating system UbuntuĀ 15.10 (Wily Werewolf) doesn't recognize the npm command like it is shown below, even though after several update attempts with sudo apt-get update:
user#user-T420:~$ sudo apt-get install nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
nodejs is already the newest version.
The following packages were automatically installed and are no longer required:
authbind diffstat hardening-includes libapt-pkg-perl libarchive-zip-perl
libbonobo2-0 libbonobo2-common libcamel-1.2-29 libclass-accessor-perl
libclone-perl libedataserver-1.2-15 libemail-valid-perl libgles1-mesa
libgnome2-0 libgnome2-bin libgnome2-common libidl-common libidl0
libindicate5 libio-pty-perl libio-string-perl libipc-run-perl
libnet-dns-perl libnet-domain-tld-perl libnet-ip-perl liborbit2
libperlio-gzip-perl libpoppler19 libqt5x11extras5 libsdl-image1.2
libtext-levenshtein-perl libtiff4 libva-drm1 libxcb-composite0 libxcb-xv0
linux-headers-4.2.0-16 linux-headers-4.2.0-16-generic
linux-image-4.2.0-16-generic linux-image-extra-4.2.0-16-generic patchutils
t1utils vlc-plugin-notify vlc-plugin-samba
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
user#user-T420:~$ npm -v
The program 'npm' is currently not installed. You can install it by typing:
sudo apt-get install npm
user#user-T420:~$ sudo apt-get install npm
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:
npm : Depends: nodejs-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
user#user-T420:~$ sudo apt-get install nodejs-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:
nodejs-dev : Depends: libssl-dev (>= 1.0.0g) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
user#user-T420:~$ sudo apt-get install libssl-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:
libssl-dev : Depends: libssl1.0.0 (= 1.0.1-4ubuntu5.36) but 1.0.2d-0ubuntu1.4 is to be installed
Depends: zlib1g-dev but it is not going to be installed
Recommends: libssl-doc but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
user#user-T420:~$ sudo apt-get install zlib1g-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:
zlib1g-dev : Depends: zlib1g (= 1:1.2.3.4.dfsg-3ubuntu4) but 1:1.2.8.dfsg-2ubuntu4 is to be installed
E: Unable to correct problems, you have held broken packages.
It looks an infinite tree of dependencies. Is there a solution to fix it?
If this would be of any help, here's my sources.list file:
#############################################################
############### OFFICIAL UBUNTU REPOSITORIES ################
#############################################################
###### Ubuntu Main Repositories
deb http://us.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
###### Ubuntu Update Repos
deb http://us.archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
###### Ubuntu Partner Repository
deb http://archive.canonical.com/ubuntu precise partner
deb-src http://archive.canonical.com/ubuntu precise partner
###### Ubuntu Extras Repository
deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main
Use aptitude instead of apt-get. It is more intelligent. It not only will handle downgrading conflicting packages for you, but it will make a series of recommendations asking you which of many possible suggested working scenarios you would like.
sudo aptitude install myNewPackage
If you don't have aptitude on your machine yet, get it with
sudo apt-get install aptitude

Resources