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?
/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 (= 22.214.171.124.44) but 126.96.36.199.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 (= 188.8.131.52.44); however: Version of linux-image-server on system is 184.108.40.206.70. linux-server depends on linux-headers-server (= 220.127.116.11.44); however: Version of linux-headers-server on system is 18.104.22.168.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)
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!
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.