Removing linux-image-4.15.0-112-generic fails - more errors follow
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
On which distro and version are you are installing it?
Which version of libbluetooth-dev are you trying to install?
Which repos are configured on your system? Show us /etc/apt/sources.list and the files in /etc/apt/sources.list.d, if any.
The installation process talks about menu.lst. This is a file that belongs to an old version of Grub, which isn't used in any recent Linux distro as far as I know. This makes me think that you are attempting to install a version of libbluetooth-dev that is not compatible with your system.
You should certainly be very cautious if apt tries to remove a "linux image", because that is your kernel. Now it might be an old kernel image which you don't actually need any more, or it might be the current one, but either way, you should always check that sort of thing before you go any further. If you open a terminal and type in
Code:
uname -r
it will print out your current kernel. If that also turns out to be 4.15.0, then you are definitely trying to install an incompatible version of the driver.
I notice also that you have a huge backlog of packages (66) waiting to be updated. Before doing anything else with apt, you should run an upgrade to get rid of that backlog. When you have done both those things, it will be time to work on the installation of the new driver.
Follow -up on my last post and hazel reply.
Hope it helps to resolve this soon.
Thanks
EDIT
I do not know why there are dupes in the output, but I leave it alone.
f@f-SATA:~$ sudo apt upgrade
[sudo] password for f:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... 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:
f@f-SATA:~$ sudo apt upgrade
[sudo] password for f:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... 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:
linux-image-4.15.0-112-generic : Depends: linux-modules-4.15.0-112-generic but it is not going to be installed
E: Broken packages
f@f-SATA:~$
The following packages have unmet dependencies:
linux-image-4.15.0-112-generic : Depends: linux-modules-4.15.0-112-generic but it is not going to be installed
E: Broken packages
f@f-SATA:~$
f@f-SATA:~$ sudo apt upgrade
[sudo] password for f:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... 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:
linux-image-4.15.0-112-generic : Depends: linux-modules-4.15.0-112-generic but it is not going to be installed
E: Broken packages
f@f-SATA:~$
f@f-SATA:~$ sudo apt update
[sudo] password for f:
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Hit:3 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Get:4 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Hit:5 http://ppa.launchpad.net/ubuntu-sdk-team/ppa/ubuntu xenial InRelease
Get:6 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:7 http://security.ubuntu.com/ubuntu xenial-security/main amd64 DEP-11 Metadata [93.0 kB]
Get:8 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 DEP-11 Metadata [130 kB]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 DEP-11 Metadata [2,464 B]
Get:10 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 DEP-11 Metadata [326 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 DEP-11 Metadata [281 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 DEP-11 Metadata [5,960 B]
Get:13 http://us.archive.ubuntu.com/ubuntu xenial-backports/main amd64 DEP-11 Metadata [3,328 B]
Get:14 http://us.archive.ubuntu.com/ubuntu xenial-backports/universe amd64 DEP-11 Metadata [6,612 B]
Fetched 1,174 kB in 1s (612 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
66 packages can be upgraded. Run 'apt list --upgradable' to see them.
f@f-SATA:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... 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:
linux-image-4.15.0-112-generic : Depends: linux-modules-4.15.0-112-generic but it is not going to be installed
E: Broken packages
f@f-SATA:~$
I can immediately see one source of trouble. You have added extra repositories that are not part of Ubuntu Xenial, for example dl.google.com and ppa.launchpad.net. Packages from such repositories will be in the required Debian/Ubuntu format but they are unlikely to be fully compatible with other packages in Xenial. We often call this kind of setup a Franken-distro. That is what has got your package manager confused. It takes a experienced system administrator to manage such a setup and you are a novice.
Start by commenting out these repositories in your sources list. If I were in your situation, I would comment out the backports repositories too, at least until you get things straight. Then hopefully, you can get apt working again.
I can immediately see one source of trouble. You have added extra repositories that are not part of Ubuntu Xenial, for example dl.google.com and ppa.launchpad.net. Packages from such repositories will be in the required Debian/Ubuntu format but they are unlikely to be fully compatible with other packages in Xenial. We often call this kind of setup a Franken-distro. That is what has got your package manager confused. It takes a experienced system administrator to manage such a setup and you are a novice.
Start by commenting out these repositories in your sources list. If I were in your situation, I would comment out the backports repositories too, at least until you get things straight. Then hopefully, you can get apt working again.
f@f-SATA:~$ sudo apt-get -f install
[sudo] password for f:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
grub-efi-amd64-bin shim
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
linux-image-4.15.0-112-generic
0 upgraded, 0 newly installed, 1 to remove and 66 not upgraded.
2 not fully installed or removed.
After this operation, 8,223 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 245609 files and directories currently installed.)
Removing linux-image-4.15.0-112-generic (4.15.0-112.113~16.04.1) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.15.0-112-generic
/etc/kernel/postrm.d/zz-update-grub:
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ...
Could not find /boot/grub/menu.lst file. Would you like /boot/grub/menu.lst generated for you? (y/N) /usr/sbin/update-grub: line 1094: read: read error: 0: Bad file descriptor
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-4.15.0-112-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-4.15.0-112-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
f@f-SATA:~$
Update
I have several backup OS scattered in different disks , I have not bothered to use them recently. So I managed to boot on one of them and successfully updated and installed the bluetooth library. Unfortunately I cannot boot it again , the old issue with mdadm is messing things up - takes forever and I am not sure why. It never finishes and keep posting "giving up ".
But I did run upgrade and it installed version 120 , not the 122 I am having issues with.
Since there is only one grub I should be able to , with little patience, to activate one of the idle OS and upgrade it to 120 and get rid of the messy mdadm.
I am actually in need to replace one of the failing RAID disks anyway , waiting for replacement to arrive. It is time to
clean up the mess anyway.
I am not too happy to hack / bypass this problem, but it is way over me head and time consuming to keep changing OS and rebooting...
Sorry.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.