Unable to install Synaptic package manager in a reload of UbuntuStudio 24.04

Ubuntu Version:
22.04 LTS

Desktop Environment (if applicable):
KDE Plasma

Problem Description:
Following a recent mishap, I’ve downloaded ubuntustudio-24.04.3-dvd-amd64.iso, flashed it onto a usb stick using Rufus in Windows11. Tested it on my linux box and then installed it ok.

This hardware has used every UbuntuStudio LTS since 14.04 without problems.

I have my home file on a separate hard disk, sda, and the system on sdb with UEFI boot. I edited the fstab file to mount my sda on /home, and it is working correctly, but I have many applications to reinstall.

I tried to install Synaptic Package Manager and this failed with a listing of a whole load of warnings and errors. The warnings concern various items being configured multiple times in /etc/apt/sources.list.d/dvd.list: and /etc/apt/sources.list.d/ubuntusources ….

W: Target Packages (universe/binary-amd64/Packages) is configured multiple times in
/etc/apt/sources.list.d/dvd.list:3 and
/etc/apt/sources.list.d/ubuntu.sources:2
W: Target Packages (universe/binary-all/Packages) is configured multiple times in
/etc/apt/sources.list.d/dvd.list:3 and
/etc/apt/sources.list.d/ubuntu.sources:2
W: Target Translations (universe/i18n/Translation-en) is configured multiple times in
/etc/apt/sources.list.d/dvd.list:3 and
/etc/apt/sources.list.d/ubuntu.sources:2
W: Target DEP-11 (universe/dep11/Components-amd64.yml) is configured multiple times in
/etc/apt/sources.list.d/dvd.list:3 and
/etc/apt/sources.list.d/ubuntu.sources:2
W: Target DEP-11 (universe/dep11/Components-all.yml) is configured multiple times in
/etc/apt/sources.list.d/dvd.list:3 and
/etc/apt/sources.list.d/ubuntu.sources:2
W: Target DEP-11-icons-small (universe/dep11/icons-48x48.tar) is configured multiple times in
/etc/apt/sources.list.d/dvd.list:3 and
/etc/apt/sources.list.d/ubuntu.sources:2
W: Target DEP-11-icons (universe/dep11/icons-64x64.tar) is configured multiple times in
/etc/apt/sources.list.d/dvd.list:3 and
/etc/apt/sources.list.d/ubuntu.sources:2
W: Target DEP-11-icons-hidpi (universe/dep11/icons-64x64@2.tar) is configured multiple times in
/etc/apt/sources.list.d/dvd.list:3 and
/etc/apt/sources.list.d/ubuntu.sources:2
W: Target DEP-11-icons-large (universe/dep11/icons-128x128.tar) is configured multiple times in
/etc/apt/sources.list.d/dvd.list:3 and
/etc/apt/sources.list.d/ubuntu.sources:2
W: Target CNF (universe/cnf/Commands-amd64) is configured multiple times in
/etc/apt/sources.list.d/dvd.list:3 and
/etc/apt/sources.list.d/ubuntu.sources:2
W: Target CNF (universe/cnf/Commands-all) is configured multiple times in
/etc/apt/sources.list.d/dvd.list:3 and
/etc/apt/sources.list.d/ubuntu.sources:2
W: Target Packages (multiverse/binary-amd64/Packages) is configured multiple times in
/etc/apt/sources.list.d/dvd.list:3 and
/etc/apt/sources.list.d/ubuntu.sources:2
W: Target Packages (multiverse/binary-all/Packages) is configured multiple times in
/etc/apt/sources.list.d/dvd.list:3 and
/etc/apt/sources.list.d/ubuntu.sources:2
W: Target Translations (multiverse/i18n/Translation-en) is configured multiple times in
/etc/apt/sources.list.d/dvd.list:3 and
/etc/apt/sources.list.d/ubuntu.sources:2
W: Target DEP-11 (multiverse/dep11/Components-amd64.yml) is configured multiple times in
/etc/apt/sources.list.d/dvd.list:3 and
/etc/apt/sources.list.d/ubuntu.sources:2
W: Target DEP-11 (multiverse/dep11/Components-all.yml) is configured multiple times in
/etc/apt/sources.list.d/dvd.list:3 and
/etc/apt/sources.list.d/ubuntu.sources:2
W: Target DEP-11-icons-small (multiverse/dep11/icons-48x48.tar) is configured multiple times in
/etc/apt/sources.list.d/dvd.list:3 and
/etc/apt/sources.list.d/ubuntu.sources:2
W: Target DEP-11-icons (multiverse/dep11/icons-64x64.tar) is configured multiple times in
/etc/apt/sources.list.d/dvd.list:3 and
/etc/apt/sources.list.d/ubuntu.sources:2
W: Target DEP-11-icons-hidpi (multiverse/dep11/icons-64x64@2.tar) is configured multiple times in
/etc/apt/sources.list.d/dvd.list:3 and
/etc/apt/sources.list.d/ubuntu.sources:2
W: Target DEP-11-icons-large (multiverse/dep11/icons-128x128.tar) is configured multiple times in
/etc/apt/sources.list.d/dvd.list:3 and
/etc/apt/sources.list.d/ubuntu.sources:2
W: Target CNF (multiverse/cnf/Commands-amd64) is configured multiple times in
/etc/apt/sources.list.d/dvd.list:3 and
/etc/apt/sources.list.d/ubuntu.sources:2
W: Target CNF (multiverse/cnf/Commands-all) is configured multiple times in
/etc/apt/sources.list.d/dvd.list:3 and
/etc/apt/sources.list.d/ubuntu.sources:2

E: Unable to parse package file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_noble_universe_binary-amd64_Packages (1)

E: Unable to parse package file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_noble_universe_i18n_Translation-en (1)

E: Unable to parse package file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_noble-security_restricted_i18n_Translation-en (1)

E: Unable to parse package file /var/lib/apt/lists/fr.archive.ubuntu.com_ubuntu_dists_noble_universe_binary-amd64_Packages (1)

E: Unable to parse package file /var/lib/apt/lists/fr.archive.ubuntu.com_ubuntu_dists_noble_universe_i18n_Translation-en (1)

W: To correct these problems, you may want to run apt update

E: The package cache file is corrupted

I tried running apt update and got this result:

Reading package lists… Error!
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)
E: Unable to parse package file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_noble_universe_binary-amd64_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_noble_universe_i18n_Translation-en (1)
E: Unable to parse package file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_noble-security_restricted_i18n_Translation-en (1)
E: Unable to parse package file /var/lib/apt/lists/fr.archive.ubuntu.com_ubuntu_dists_noble_universe_binary-amd64_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/fr.archive.ubuntu.com_ubuntu_dists_noble_universe_i18n_Translation-en (1)
W: To correct these problems, you may want to run apt update
E: The package cache file is corrupted

When I look in /etc/apt/sources.list.d/ I see three sub-directories: dvd.list, ubuntu.sources.list, ubuntu.sources.curtin.orig

How can I safely remove the duplications and correct the corrupted package cache file?

I would cd /etc/apt/sources.list.d/ and comment out all lines in dvd.list Then, I would look in ubuntu.sources and see if there are duplicates, if so, comment them out.

The lock is there b/c there is a process running, identify the process and kill it. sudo apt install synaptic installed w/o errors.sudo apt update should run clean.

dot list (.list) files were in the past, ubuntu moved to dot sources files. You should not have both, keep only the dot sources (.sources)

My 24.04 has only 2 entries in /etc/apt/sources.list.d/ubuntu.sources

user@u24:/etc/apt/sources.list.d$ cat ubuntu.sources
Types: deb
URIs: http://us.archive.ubuntu.com/ubuntu/
Suites: noble noble-updates noble-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

Types: deb
URIs: http://security.ubuntu.com/ubuntu/
Suites: noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
1 Like

Actually, the easiest and recommended way of disabling sources.list.d drop-ins is to rename them to not end with “sources” or “list”, so it’s as easy as:

$ sudo mv /etc/apt/sources.list.d/dvd.list{,.disable}

This works in almost all places where such drop-ins are being used. If the files don’t fit the pattern, like *.{list,sources,conf} they will be ignored. In some cases the .disable extension is required to not be pestered by warnings about ignored files, so I think it best to just stick to that, even though it’s a bit long.
Arguably, in this case it (dvd.list) can also be just removed, I think.

1 Like

Thanks, kairis.

I’ve commented out the lines in dvd.list. In my /etc/apt/sources.list.d/ubuntu.sources, the only 2 entries are same as yours (with the exception they are fr.ubuntu instead of us.ubuntu).

System Monitor shows so many processes. I don’t see anything like apt. What process is likely to be locking /var/lib/apt/lists/ ?

Try running sudo apt update now

Show us the full output if there are errors.

Please use code tags rather than quotes for the terminal output. You can do this by highlighting what you pasted and clicking on </> in the composer.

No need to ask what’s likely to have a file open, you can find out exactly with ‘lsof’ (list open files).

lsof /var/lib/apt/lists/lock

should give you the process which has that file open.

2 Likes

Thanks hdd-gehrke for the hint about lsof. However, I rebooted the machine and then ran ‘sudo apt update’. This is the resulting output:

Hit:1 http://security.ubuntu.com/ubuntu` noble-security InRelease Hit:2 http://fr.archive.ubuntu.com/ubuntu noble InRelease Hit:3 http://fr.archive.ubuntu.com/ubuntu noble-updates InRelease Hit:4 http://fr.archive.ubuntu.com/ubuntu noble-backports InRelease Reading package lists… Error! E: Unable to parse package file /var/lib/apt/lists/fr.archive.ubuntu.com_ubuntu_dists_noble_universe_binary-amd64_Packages (1) E: Unable to parse package file /var/lib/apt/lists/fr.archive.ubuntu.com_ubuntu_dists_noble_universe_i18n_Translation-en (1) E: Unable to parse package file /var/lib/apt/lists/fr.archive.ubuntu.com_ubuntu_dists_noble-updates_universe_binary-amd64_Packages (1) W: To correct these problems, you may want to run apt update E: The package cache file is corrupted`

How to deal with the corrupted package cache file?

Please do use those code tags.

[code]
$ sudo apt update
[sudo] password for peter:
Hit:1 http://de.archive.ubuntu.com/ubuntu noble InRelease
Get:2 http://de.archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB]
Get:3 http://security.ubuntu.com/ubuntu noble-security InRelease [126 kB]
Get:4 http://de.archive.ubuntu.com/ubuntu noble-backports InRelease [126 kB]
Get:5 http://de.archive.ubuntu.com/ubuntu noble-updates/main amd64 Components [177 kB]
Get:6 http://de.archive.ubuntu.com/ubuntu noble-updates/restricted amd64 Components [212 B]
Get:7 http://de.archive.ubuntu.com/ubuntu noble-updates/universe amd64 Components [386 kB]
Get:8 http://de.archive.ubuntu.com/ubuntu noble-updates/multiverse amd64 Components [940 B]
Get:9 http://de.archive.ubuntu.com/ubuntu noble-backports/main amd64 Components [7.352 B]
Get:10 http://de.archive.ubuntu.com/ubuntu noble-backports/restricted amd64 Components [216 B]
Get:11 http://de.archive.ubuntu.com/ubuntu noble-backports/universe amd64 Components [13,2 kB]
Get:12 http://de.archive.ubuntu.com/ubuntu noble-backports/multiverse amd64 Components [212 B]
Get:13 https://esm.ubuntu.com/apps/ubuntu noble-apps-security InRelease [8.371 B]
Get:14 http://security.ubuntu.com/ubuntu noble-security/main amd64 Components [21,5 kB]
Get:15 http://security.ubuntu.com/ubuntu noble-security/restricted amd64 Components [208 B]
Get:16 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Components [74,3 kB]
Get:17 http://security.ubuntu.com/ubuntu noble-security/multiverse amd64 Components [212 B]
Get:18 https://esm.ubuntu.com/apps/ubuntu noble-apps-updates InRelease [8.220 B]
Get:19 https://esm.ubuntu.com/infra/ubuntu noble-infra-updates InRelease [8.213 B]
Get:20 https://esm.ubuntu.com/infra/ubuntu noble-infra-security InRelease [8.214 B]
Hit:21 https://deb.torproject.org/torproject.org noble InRelease
Fetched 1.093 kB in 4s (304 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
38 packages can be upgraded. Run 'apt list --upgradable' to see them.
[/code]

Or use markdown:

```
multiline code
```

or HTML:

<pre>
preformatted text
</pre>

The buttons at the top of the reply form have shortcuts for the most common use cases.

to clean up corrupt cache

sudo rm -rf /var/lib/apt/lists/*

sudo apt update

Sorry peterwhite23 - I did use the code tags but I’m working under a handicap. I can’t get a browser to load in UbuntuStudio, there are no snaps installed, I can’t get Dropbox or any other package installed. I have to copy/paste from the terminal to a text editor and then use a usb stick to transfer to a Windows box where I can paste into this forum. The copy/paste fouls up the formatting from the original. The Blockquote gave the best representation.

Aah, the old DOS quirk of having different line endings (CRLF); hadn’t thought of that. I take it, you opened that file in Windows Notepad and copied its content? It was all just one long line?

You can use sed 's/$/\r/g' < my-log.unix.txt > my-log.dos.txt and then paste the content of my-log.dos.txt.

For completeness, there is also the tofrodos package, which provides the convenience tools todos and fromdos. But that won’t help you much on the broken UbuntuStudio, of course. But similar programs must exist for Windows. And, if I am reading this correctly, Notepad should be able to handle Unix line endings, so maybe you just need to flip some option switch.

I also find it best to just switch to standard markdown mode (the “M” button, top left), because the rich text editor isn’t very good at this, because you’d need to paste first and then format, which is most likely to late. The editor should know in advance that it is not to mess with the formatting, which it does, when you start with ``` on a single line.

Thanks, peterwhite23 for that info. Back to my broken installation.

I found a suggestion on another thread for dealing with corrupted cache files. That hasn’t helped. I’ve made clean installs of all UbuntuStudio LTS distros since 14.04 without difficulty, and when Ubuntu started on snaps, they always appeared in the clean installation. I never had to do anything except remove those I didn’t want.

This time, after a mishap which spoiled the existing 24.04.4 LTS, I downloaded the UbuntuStudio 24.04.4 iso for amd64 hardware, flashed it to a usb stick using Rufus on Windows and went for a ‘try’ boot up. All seemed good, so I went for a clean install, but it failed after around 20 minutes. I retried twice more but with the same failure. (I did post one of the failure logs to wherever they go - can’t find it since).

Suspecting a hardware problem, I passed the box to my local computer shop, where they checked it out, including ram and disks without finding any fault. They downloaded the same 24.04.4 iso file, flashed it to one of their usb sticks using whatever tool chain they use, and also had 3 failed installation attempts. So they tried an install of Linux Mint which worked fine.

My only complaint about Mint is that it’s different and not what I’m used to. So, just in case the 24.04.4 iso file had a problem, I tried the 24.04.3 iso. This did succeed in completing the installation and I successfully edited the fstab to get my separate home disk mounted at /home. I had hoped that if I could get apt to work, I could reload other missing applications.

But, it looks like this installation is a wreck. It should probably be abandoned.

You should have led with that explanation. There really is no point in trying to get a half-installed system to work. You should start from scratch. Also check the md5 or sha256 sums of your downloads. The live installer also has integrity checking in the boot menu; it may even be a wonky USB port.

1 Like

You did not say what failed after 20 min.

I posted how to clean up corrupt cache.

Also, please post the steps you did to mount /home.

A basic install, say on /dev/sda
mount /dev/sdb1 /home ext4 defaults 0 2
reboot
now your /home points to /dev/sdb1

(sudo blkid will give you the uuid of the second disk, use that in fstab)

Post output of df

@peterwhite23 - of course I did check the sha256 sum of the download. And I didn’t know at first how broken the installation was.

@kairis - yes, you did say how to clean up the corrupt cache and that was also what I found in another thread. I tried it and the subsequent ‘apt update’ command threw up a lot of other errors including stuff about python packages.

The install stopped after about 20 minutes with an error message that I don’t recall now. I tried a second and third time and the fallover was always around the 20 minute mark (for comparison, the install of 24.04.3 which went to completion apparently successfully, took around 32 minutes). At the third failure, I took the actions offered to report the failure - clicked the links and apparently the logs went up to ‘hq’ somewhere.

For mounting my second hard disk as /home - this is what I did: I knew the UUIDs and the makers model numbers and serial numbers of both disks, having used blkid and other commands. The install routine offered me a choice of disk for the system by showing sda & sdb by their part nos and serial numbers (both 1TB disks) . The disk on which I wanted to install the system was recognised as sdb and that is where the install went (sdb1 efi, sdb2 / ).

After rebooting and what looked like a good start-up with the generic UbuntuStudio splash screens, I used blkid to confirm the UUID of sda, and it was unchanged. I then edited /etc/fstab file by adding the following line (which was the same as I had in the previous installations of UbuntuStudio over the years):

UUID=8cd89431-2d4a-437e-8254-4a654e0b3107 /home ext4 defaults 0 2

I then rebooted the box, and up came my familiar homescreen and all my files correctly shown in Dolphin under /home/myname. So that procedure seemed correct and all files usable.


This is a holiday weekend, and family has kept me busy today. I just tried to boot up the linux box and it stalled after the motherboard splash screen with this prompt:

(initramfs) -
I tried again and selected recovery mode from the options offered. This indicated that :

“the root filesystem on /dev/sdb2 requires a manual fsck”

I guess this is a result of the various attempts yesterday - maybe not. I’ve had enough of this for today. I’ll try a fresh install tomorrow.

I d/l studio24.04 and installed it on a VM. Installation was successful. Upon update/upgrade it complained about /etc/apt/sources.list.d/dvd.list which I removed. update/upgrade is clean, snapd is installed, firefox is installed.

user@studio:~$ sudo snap list
Name                       Version                         Rev    Tracking         Publisher   Notes
bare                       1.0                             5      latest/stable    canonical✓  base
core22                     20260225                        2411   latest/stable    canonical✓  base
core24                     20260317                        1587   latest/stable    canonical✓  base
firefox                    149.0-1                         8054   latest/stable/…  mozilla✓    -
firmware-updater           0+git.7d22721                   223    latest/stable/…  canonical✓  -
freeshow                   1.5.9                           170    latest/stable/…  eeickmeyer  -
gnome-42-2204              0+git.c1d3d69-sdk0+git.015db9a  247    latest/stable/…  canonical✓  -
gnome-46-2404              0+git.f1cd5fa-sdk0+git.ca9c59c  153    latest/stable/…  canonical✓  -
gtk-common-themes          0.1-81-g442e511                 1535   latest/stable/…  canonical✓  -
mesa-2404                  25.0.7-snap211                  1165   latest/stable/…  canonical✓  -
snapd                      2.74.1                          26382  latest/stable    canonical✓  snapd
snapd-desktop-integration  0.9                             357    latest/stable/…  canonical✓  -
thunderbird                140.9.0esr-1                    1043   latest/stable/…  canonical✓  -

OK- another day, and I did a fresh install of the 24.04.3. I made one small change in the process - instead of accepting to go online and receive update to the installation process, I remained off-line. But I’m not going to pretend that made the difference. The installation completed in 12 minutes.

I don’t exclude that the hardware may have some as yet undiscovered problem, and I am planning its replacement.

I edited fstab as before and got my desktop back with all my ‘/home’ directory on the separate hard disk. All the snaps were installed (unlike previously). I applied all the updates to the system (using Discover) and then refreshed the snaps so everything is up to date.

I still have some applications to reinstall, of course. The first thing I tried was to install Synaptic Package Manager, but this has not worked. I tried using Discover and it loaded an informative page which claimed it was distributed by an unknown source - no install link.

When I tried with apt and apt-get, it failed with:

Package synaptic is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Has Ubuntu discarded Synaptic ? What replaces it? I seem to recall that UbuntuStudio LTS had Muon package manager years ago but then dropped it.

sudo apt install synaptic gives you errors?

user@studio:~$ apt policy synaptic
synaptic:
  Installed: 0.91.3build4
  Candidate: 0.91.3build4
  Version table:
 *** 0.91.3build4 500
        500 http://us.archive.ubuntu.com/ubuntu noble/universe amd64 Packages
        100 /var/lib/dpkg/status

Certainly does.

sudo apt install synaptic
[sudo] password for pnj: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package synaptic is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'synaptic' has no installation candidate

This is what my /etc/apt/sources.list.d/ubuntu.sources file has:

Types: deb
URIs: http://archive.ubuntu.com/ubuntu/
Suites: noble noble-updates noble-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

Types: deb
URIs: http://security.ubuntu.com/ubuntu/
Suites: noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

Although structured differently, it looks like it should cover noble universe.

Can you please run these again and show us the full output:

sudo apt update
apt policy synaptic
apt search synaptic