I have a Ubuntu 14.04 , and kernel 3.16.0-30 , if i do :

sudo apt-get update sudo apt-get install libtool automake libncurses5-dev kernel-package 

or

sudo apt-get update sudo apt-get install cvs subversion build-essential git-core g++-multilib gcc-multilib 

the result is :

ore g++-multilib gcc-multilib Reading package lists... Done Building dependency tree... 50% Building dependency tree Reading state information... Done build-essential is already the newest version. cvs is already the newest version. g++-multilib is already the newest version. gcc-multilib is already the newest version. git-core is already the newest version. subversion is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 474 not upgraded. 

what is the problem ? and how resolved this problem ?

3

6 Answers

This usually happens when some of the packages are kept back. You can use the following commands (which worked for me)

Install aptitude sudo apt install aptitude

Then, run this command sudo aptitude safe-upgrade

1

this works for me

sudo apt-get dist-upgrade 

The source.list might be outdated. Try replacing your /etc/apt/sources.list with the following source.list

for ubuntu 14.04
for ubuntu 16.04
for ubuntu 18.04
for ubuntu 20.04

After replacing source list do following:

sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade 
  1. create a bash file (upgrade.sh) in your home directory.
  2. paste this code in it.

.

#!/bin/bash sudo apt update && sudo apt upgrade sudo apt-get update && sudo apt-get upgrade sudo apt-get install aptitude -y sudo aptitude safe-upgrade sudo apt update && sudo apt upgrade 

3.save it

4.run : bash upgrade.sh

  1. everytime just don't type these commands just enter (bash upgrade.sh)

Solution: Some background info: I am running ubuntu server 22.0 LTS in virtualbox & accessing using SSH. But the commands should work on practically any installation of ubuntu as long as you can use apt command.

Step 1:

sudo apt update && sudo apt full-upgrade && sudo apt autoremove 

This won't resolve your problem but make it easier for you (lazy people :)), to run the following commands.

Output of the above command:

Hit:1 jammy InRelease Hit:2 jammy-updates InRelease Hit:3 jammy-backports InRelease Hit:4 jammy-apps-security InRelease Hit:5 jammy-security InRelease Hit:6 jammy-apps-updates InRelease Hit:7 jammy-infra-security InRelease Hit:8 jammy-infra-updates InRelease Reading package lists... Done Building dependency tree... Done Reading state information... Done 8 packages can be upgraded. Run 'apt list --upgradable' to see them. Reading package lists... Done Building dependency tree... Done Reading state information... Done Calculating upgrade... Done The following packages have been kept back: libnss-systemd libpam-systemd libsystemd0 libudev1 systemd systemd-sysv systemd-timesyncd udev 0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded. 

Step 2:

Copy the 2nd last line, which contains a list of packages (in space separated format), that were not upgraded by previous commands. This will help you to NOT type the entire list if there are hundreds of'em.

We have 3 solutions for this problem, try them 1 by 1. depending upon the configuration, preferences, and the reason for the packages not getting upgraded, any 1 of these can resolve the problem. For me, the 3rd solution worked.

Solution 1: (didn't work for me, but has been reported to work for many users)

sudo apt-get -f install sudo apt-get dist-upgrade 

Solution 2: (didn't work for me, but has been reported to work for many users)

sudo apt upgrade --with-new-pkgs 

Solution 3: (worked on my machine)

sudo apt install --only-upgrade libnss-systemd libpam-systemd libsystemd0 libudev1 systemd systemd-sysv systemd-timesyncd udev 

In the above command, you can replace the package list with your own list that you copied in step 2 above.

Try all 3 solutions, because depending upon the configuration, preferences, and the reason for the packages not getting upgraded, any 1 of these can resolve the problem.

sudo apt update && sudo apt upgrade sudo apt-get update && sudo apt-get upgrade sudo apt-get install aptitude -y sudo aptitude safe-upgrade sudo apt update && sudo apt upgrade 
2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.