So I think Ubuntu updated their repositories. On a fresh install of 24.04, using the same iso file I’ve kept from a couple months ago if I install build-essential it fails because of dependencies. ROCM fails with a LOT of dependencies being the wrong version, and their dependencies, it goes pretty deep with a lot of them.
So if I start installing different versions of these dependencies I am afraid of breaking Ubuntu. This wasn’t an issue with the same fresh install from the same .iso a couple months ago, for the same version of ROCM.
Is there a way for me to use an older repository from a couple months ago so I can use ROCM again? Seems pretty bad I can’t install it on a fresh install of the OS, not even build-essential which I would of thought would be a pretty common thing for them to break.
Or am I completely misunderstanding what’s going on? I’m relatively new to Linux.
Please show us complete, actual input and output demonstrating the problem.
Simply copy-and-paste the terminal text.
Q: On your fresh install, did you run sudo apt update and sudo apt upgrade before trying to install additional software? And those commands completed with zero errors?
Update and upgrade did indeed work fine on the fresh install with zero hours. I also attached Ubuntu Pro to this machine which all installed fine and ‘snap refresh’ too.
Here’s the build essential, only one dependency error;
ubuntu@desktop:~$ sudo apt install build-essential
Reading package lists... Done
Building dependency tree... Done
Reading state information... 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.
dpkg-dev : Depends: bzip2 but it is not installable
E: Unable to correct problems, you have held broken packages.
Here’s trying to install ROCm
ubuntu@desktop:~$ for ver in 6.4.1; do
sudo apt install rocm$ver
done
Reading package lists... Done
Building dependency tree... Done
Reading state information... 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.
libdeflate-dev : Depends: libdeflate0 (= 1.19-1build1) but 1.19-1build1.1 is to be installed
libicu-dev : Depends: libicu74 (= 74.2-1ubuntu3) but 74.2-1ubuntu3.1 is to be installed
libzstd-dev : Depends: libzstd1 (= 1.5.5+dfsg2-2build1) but 1.5.5+dfsg2-2build1.1 is to be installed
mesa-common-dev : Depends: libdrm-dev (>= 2.4.95) but it is not installable
rocm-gdb6.4.1 : Depends: python3-dev but it is not installable
zlib1g-dev : Depends: zlib1g (= 1:1.3.dfsg-3.1ubuntu2) but 1:1.3.dfsg-3.1ubuntu2.1 is to be installed
E: Unable to correct problems, you have held broken packages.
Ah, I see a lot of = in the dependencies.
Yes, might be that the rocm package is built to require exact version dependencies. Many non-Ubuntu packages do that…and it creates exactly this kind of problem.
If so, one possible course of action is to reinstall Ubuntu 24.04, then don’t install any updates. Install rocm first. However, rocm’s strict version requirements will block many Ubuntu updates…perhaps including security patches. So it’s an alternative with a limited lifespan.
Another possible course of action is to file a bug report with the rocm developers, informing them that their package is stale and they might consider updating it to match current Ubuntu 24.04 repository versions. Alternately, the rocm developers are welcome to package using snap to avoid the upgrade-treadmill.
A package version changes every time a new patch is included, including both bugfixes and security patches that might not come from the upstream developers. This sometime confuses folks who expect version changes to occur only upon new upstream releases.
Yes, this error occurs before installing anything else. ROCm was attempted AFTER trying to install build-essential. Nothing else has been installed.
Here’s a paste of the terminal after putting in the commands regarding bzip2;
ubuntu@desktop:~$ apt-cache policy bzip2
apt -s install bzip2
bzip2:
Installed: (none)
Candidate: 1.0.8-5.1
Version table:
1.0.8-5.1 500
500 http://archive.ubuntu.com/ubuntu noble/main amd64 Packages
NOTE: This is only a simulation!
apt needs root privileges for real execution.
Also, keep in mind that locking is deactivated,
so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree... Done
Reading state information... 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.
bzip2 : Depends: libbz2-1.0 (= 1.0.8-5.1) but 1.0.8-5.1build0.1 is to be installed
E: Unable to correct problems, you have held broken packages.
To be able to install ROCm first I’d have to use apt update after adding ROCm’s repository, if I don’t run apt upgrade will it still work? This specific Ubuntu install is only for playing around with AI stuff so longevity really isn’t important, I regularly wipe it anyway.
You’re right, of course.
I suppose you could disable the various Ubuntu repos, then run the update and upgrade.
However, that’s hacky…and I never recommend disabling the security repository as a real long-term answer. So this may be useful for testing. But I wouldn’t suggest it for production use.
The real solution, if I have read the output correctly, is for the rocm upstream to become a teeny bit more sophisticated in their Linux packaging.
Unfortunately it isn’t just ROCm but Ubuntu’s team as well. ‘build-essential’ is on the official repository that comes with Ubuntu yet you can’t install it on a fresh install of Ubuntu 24.04.2 which was released a few months ago and they still haven’t fixed it.
Let’s treat that as a completely separate problem and do some troubleshooting.
Your output of apt-cache policy bzip2 seems to be missing an entry for the noble-updates repo, which does indeed include the newer version that apt is seeking.
I just spun up a fresh VM, installed from the 24.02.2 iso without installing updates. After booting the new install I took a snapshot. I then tried to install build-essential and it worked fine. I restored to the fresh snapshot, updated and upgraded so I had all current updates, rebooted, and tried to install build-essential and it worked fine. So there’s something else different about your case. Please do provide the information others have asked for.