I only version locked the fpc package. So far never have any issue.
Are you sure that a lock on fpc is my solution? My problem was the deinstall of Lazarus, not an update of fpc.
Your case might be different. But what happened on my case was my Ubuntu was holding a broken package (which caused by the software update), I knew it because I checked using Synaptic Package Manager. I simply uninstalled that broken package, reboot the computer, remove all the lazarus/fp* related items and reinstall the things I want ... everything just back to normal.
For you information. You should use the installation provided by Ubuntu, it is the
most easiest thing to do. Unless, you want
to use the version you that has not been available on the Ubuntu repository yet. For example, Lazarus just makes a new release available.
All this Lazarus-Ubuntu troubles only happen because you're not using the installation packages provided by your Ubuntu. I'm not sure but I guess Lazarus 1.8.4 should now already been available on Ubuntu repository.
So for ubuntu users: don't use the deb files downloaded from SourceForge.
But if you're adventurous
, here are my advices:
Make sure you have some knowledge in using Linux Terminal or at least you've already installed some tools to make it easier. I'm not very good in using Linux Terminal, so I prefer the GUI tools. I recommend Synaptic Package Manager and GDebi.
Pay attention and write down all the steps you're doing. So you can review and roll back if anything goes wrong.
You may need to disconnect the Internet. Not always but it ever happened on my test, Ubuntu automatically downloaded and forced me to use the packages from its repository when installing Lazarus/FPC from the deb files I got from SourceForge.
And don't forget doing version locking.
My solution is not the only solutions. You may tried @JuhaManninen suggestion to manually build your own Lazarus or @bylaardt trick to modify the deb files. I haven't tried them but they should work.
JuhaManninen's how to build your own Lazarus from source:
https://forum.lazarus.freepascal.org/index.php/topic,42393.msg295887.html#msg295887bylaardt's how to modify the deb files:
https://forum.lazarus.freepascal.org/index.php/topic,41333.msg287683.html#msg287683