0

I am wanting to install PHP5 on an internal production server running Ubuntu 12.04 LTS. When I try to use apt-get to install it lists a multitude of dependencies and recommends running apt-get -f install. When I run that I get this returned:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  linux-headers-3.2.0-59 linux-headers-3.2.0-59-generic linux-headers-server linux-image-3.2.0-59-generic linux-image-server linux-server
Suggested packages:
  fdutils linux-doc-3.2.0 linux-source-3.2.0 linux-tools
The following NEW packages will be installed:
  linux-headers-3.2.0-59 linux-headers-3.2.0-59-generic linux-image-3.2.0-59-generic
The following packages will be upgraded:
  linux-headers-server linux-image-server linux-server
3 upgraded, 3 newly installed, 0 to remove and 379 not upgraded.
3 not fully installed or removed.
Need to get 51.4 MB of archives.
After this operation, 218 MB of additional disk space will be used.
Do you want to continue [Y/n]? n

Is this a safe upgrade to do on a production machine? I know apt-get dist-upgrade can be pretty major and break things. Is this a minor upgrade or major?

Thanks

---Update 1---

The /boot partition is full, not allowing me to run apt-get -f install. When attempting to run this script from ubuntugenius dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge I get the following:

rgs sudo apt-get -y purge 
[sudo] password for tech: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 linux-headers-server : Depends: linux-headers-3.2.0-59-generic but it is not going to be installed
 linux-server : Depends: linux-headers-server (= 3.2.0.37.44) but 3.2.0.59.70 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

I feel like im stuck in a bit of a loop now with a full /boot that wont let me run repairs, yet I cant purge /boot without running the repairs.

--- Update 2 ----

I have successfully cleared out some space in /boot only now to get the following error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  linux-server
The following packages will be upgraded:
  linux-server
1 upgraded, 0 newly installed, 0 to remove and 379 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,732 B of archives.
After this operation, 1,024 B of additional disk space will be used.
Do you want to continue [Y/n]? y
dpkg: dependency problems prevent configuration of linux-server:
 linux-server depends on linux-image-server (= 3.2.0.37.44); however:
  Version of linux-image-server on system is 3.2.0.59.70.
 linux-server depends on linux-headers-server (= 3.2.0.37.44); however:
  Version of linux-headers-server on system is 3.2.0.59.70.
dpkg: error processing linux-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          Errors were encountered while processing:
 linux-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

2 Answers 2

1

apt-get -f install is a repair operation. So something is currently wrong with your system that this is intended to fix.

My guess would be, if you haven't got a kernel installed now, that you really need to do this, as your system right now might not even be bootable!

8
  • Thanks. Apparently my boot partition is full so I am currently looking into purging old before being able to run this repair. I'm reading up on this method ubuntugenius.wordpress.com/2011/01/08/…
    – Brian
    Feb 21, 2014 at 16:54
  • Yes, a full /boot is almost certainly why it would have failed previously. Feb 21, 2014 at 16:55
  • Please see update 1 above. I cant even get things to purge from /boot
    – Brian
    Feb 21, 2014 at 17:09
  • You shouldn't be doing anything else with apt-get until you have successfully run apt-get -f install. You'll have to clean out /boot manually. Feb 21, 2014 at 17:10
  • Whats the best method for cleaning out /boot manually?
    – Brian
    Feb 21, 2014 at 17:14
1

It's just a kernel upgrade which is available. You can update without problems. Once you reboot it will load the new kernel. If something does happen, you can choose the older kernel at your bootloader and uninstall the latest one.

You must log in to answer this question.

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