0

During the previous months to the new release of Ubuntu 16.04.4, I wrote a C++ project using the following enviroment:

  • Ubuntu 16.04.3
  • Kernel 4.4.0-87 (only version compatible with the drivers of an acquisition card used in my C++ project). The kernel version is hold (i.e. preventing to update to a more recent kernel version).

However, during the installation of a new driver, my ubuntu version changed to 16.04.4 and now I am getting errors during the compilation of my code. The problem is that the error is associated to a third-party library that I need... So I tried to get back to the 16.04.3 and everytime I need to install something, the version of my OS gets updated... How could I prevent the OS to update to the 16.04.4 version? It may be with the apt-get hold?? but I don't know the name of the package.

Thanks!

1

You need to disable your HWE (Hardware Enablement Stack). From this Q&A: How to disable HWE messages (14.04) you can turn off messages using:

sudo touch /var/lib/update-notifier/disable-hwe-eol-messages

From this Q&A: Rolling back to non-HWE stack on Ubuntu 16.04.2 you can use:

sudo apt-get remove xserver-xorg-hwe-16.04
sudo apt install xserver-xorg-core
sudo apt install ubuntu-desktop xserver-xorg libgl1-mesa-dri:i386 libgl1-mesa-glx:i386

Not specified in the linked answer, but I would run these commands from the console (Ctrl+Alt+F1) login.

Please read the links carefully and ensure they describe exactly what you want to do. If in doubt post a comment before proceeding.


Another option is to pin kernel version 4.4.0-87 so it never gets upgraded. See this Q&A: How can I avoid kernel updates?. Basically you will:

sudo apt-mark hold <package_name>
sudo apt-mark hold linux-image-generic linux-headers-generic

This isn't a specific answer but will get you started in the right direction.

  • Thanks for your answer. I have read the links you posted and if I have properly understood, the HWE is useful when new hardware has to properly work in Ubuntu. In order to do it, Ubuntu uses rolling releases for the kernel, which I keep the same version. I have run the commands in a virtual machine to check if it works for me. However, if I disable the HWE, I still get the new 16.04.4 Ubuntu version after an apt-get upgrade. How can I avoid to upgrade from 16.04.3 to 16.04.4 after an apt-get upgrade? – JUP Apr 29 '18 at 21:31
  • @JUP I had a similar problem where I set updates to never and it still kept telling me every day I had updates waiting. It wasn't until I accidentally installed updates (or it did behind my back) that the "never" option was honoured and it hasn't told me about updates since. I can't honestly say what is specifically causing your specific problem but I'll keep digging. – WinEunuuchs2Unix Apr 29 '18 at 21:44
  • @JUP I added kernel pinning to the answer. I have to run out otherwise I would have devoted more time to polish it up. – WinEunuuchs2Unix Apr 29 '18 at 21:48
  • Thanks for your comments. The issue is not with the kernel, i.e. the kernel is hold to 4.4.0-87 using sudo apt-mark hold and does not upgrade after an apt-get upgrade. However, the version of Ubuntu is upgraded from 16.04.3 to 16.04.4 and this is my real issue. Is there any way to fix the version of Ubuntu? – JUP Apr 30 '18 at 6:47
  • I have also tried setting the updates to never by modifying the file /etc/update-manager/release-upgrades without success. Any help? – JUP Apr 30 '18 at 7:02

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.