Stuck trying to upgrade from Ubuntu 18.04 to 20.04 ‘multiverse’ component misspelt in sources.list?
Stuck Trying to Upgrade from Ubuntu 18.04 to 20.04 ‘multiverse’ (Component Misspelt in sources.list?)
Upgrading your Ubuntu operating system is a crucial task for maintaining security, accessing the latest features, and ensuring compatibility with modern software. However, the upgrade process can sometimes be fraught with errors. One common issue encountered when upgrading from Ubuntu 18.04 (Bionic Beaver) to Ubuntu 20.04 (Focal Fossa) involves errors related to the ‘multiverse’ component in your sources.list
file. At revWhiteShadow, we understand these challenges, and this guide, crafted by revWhiteShadow for kts personal blog site, provides a comprehensive approach to resolving this specific upgrade obstacle.
Understanding the ‘multiverse’ Component and Its Role
The Ubuntu repositories are organized into different components: main, universe, restricted, and multiverse. The ‘multiverse’ repository contains software that is not free due to licensing restrictions or legal issues. While Ubuntu provides this software for users who need it, it’s not officially supported in the same way as the ‘main’ and ‘universe’ repositories. The upgrade process relies on correctly configured repositories to fetch the necessary packages. If the ‘multiverse’ component is misconfigured or unavailable, it can halt the upgrade.
Why This Error Occurs During the Upgrade
The error messages you encountered, such as:
W: Skipping acquire of configured file 'multiverse/binary-amd64/Packages' as repository 'http://archive.canonical.com/ubuntu bionic InRelease' doesn't have the component 'multiverse' (component misspelt in sources.list?)
indicate that the system is attempting to access the ‘multiverse’ component from the Bionic Beaver (18.04) repositories. The problem arises because the upgrade process might be partially configured to look for packages in the old repositories even as it prepares to transition to the Focal Fossa (20.04) repositories. In some scenarios, the upgrade tool might incorrectly assume that the ‘multiverse’ repository should be available at the Bionic Beaver address. However, the core issue stems from how the upgrade tool handles repository updates and potential discrepancies in your sources.list
file. A corrupted or incorrectly formatted sources.list
file will trigger the error during the upgrade.
Step-by-Step Solutions to Fix the ‘multiverse’ Error
Here’s a breakdown of methods you can implement to fix the problem to upgrade from Ubuntu 18.04 to Ubuntu 20.04. Each step is designed to address different aspects of the potential issue. We recommend following the steps in order.
1. Back Up Your sources.list
File
Before making any changes, always back up your sources.list
file. This ensures that you can revert to the original configuration if something goes wrong.
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
This command creates a backup of your sources.list
file named sources.list.backup
in the same directory.
2. Examine and Correct Your sources.list
File
The most likely cause is an incorrect entry in the sources.list
file. Here’s how to examine and correct it:
- Open the
sources.list
file:
sudo nano /etc/apt/sources.list
- Carefully inspect each line. Look for any lines that reference ‘bionic’ and also include ‘multiverse’. An example of a correct multiverse line for Ubuntu 18.04 would be:
deb http://archive.ubuntu.com/ubuntu bionic multiverse
deb http://archive.ubuntu.com/ubuntu bionic-updates multiverse
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
- Ensure there are no typos. The word ‘multiverse’ is frequently misspelt. If you find lines that appear to be duplicates or are commented out (prefixed with ‘#’), remove or correct them. Be extra careful, especially with entries containing
archive.canonical.com
. Canonical’s partner repository should not specify the multiverse component. So this line:
deb http://archive.canonical.com/ubuntu bionic partner
is correct without multiverse.
- Comment out problematic lines: If the system is looking for multiverse from canonical bionic, and you do not want to remove the whole line, you can comment out the specific multiverse line by placing a
#
at the beginning of the line, if removing the lines is not an option.
# deb http://archive.canonical.com/ubuntu bionic multiverse partner
- Save the changes and exit the editor. In
nano
, pressCtrl+X
, thenY
to confirm, and thenEnter
to save.
3. Update Your Package Lists
After modifying the sources.list
file, update the package lists to reflect the changes:
sudo apt update
This command fetches the latest package information from the configured repositories. Pay attention to any errors that appear during the update process. If the error persists, it might indicate a problem with the repository itself or a network connectivity issue.
4. Check for and Fix Broken Dependencies
Sometimes, broken dependencies can prevent the upgrade process from completing successfully. Use the following command to check for and fix broken dependencies:
sudo apt --fix-broken install
This command attempts to resolve any dependency issues by installing or removing packages as needed.
5. Upgrade the Package Manager
Ensure that the apt
package manager is up to date before attempting the upgrade:
sudo apt update
sudo apt upgrade apt
This ensures that you have the latest version of the package manager, which may include bug fixes and improvements that can help with the upgrade process.
6. Use the do-release-upgrade
Command
The standard way to upgrade Ubuntu is using the do-release-upgrade
command:
sudo do-release-upgrade
This command checks for a new release and guides you through the upgrade process. However, before running this, it is often useful to run it in check mode first:
sudo do-release-upgrade -c
This will check if the upgrade is possible, and provide warnings and information before you proceed.
7. Dealing with Third-Party Repositories
If you’ve added any third-party repositories to your system, they could be causing conflicts during the upgrade.
- Identify Third-Party Repositories: Review your
sources.list
file and any files in the/etc/apt/sources.list.d/
directory for entries that don’t belong to the official Ubuntu repositories. - Disable Third-Party Repositories: Comment out the lines for these repositories by adding a
#
at the beginning of each line. - Attempt the Upgrade Again: After disabling the third-party repositories, try running
sudo apt update
and thensudo do-release-upgrade
again.
Once the upgrade is complete, you can re-enable the third-party repositories and update them to be compatible with Ubuntu 20.04. However, be cautious as some repositories may not be supported on the newer version.
8. Purging and Reinstalling Problematic Packages
If the error seems to be related to a specific package, you can try purging and reinstalling it:
- Identify the Problematic Package: Look for any error messages that mention a specific package.
- Purge the Package:
sudo apt purge <package_name>
Replace <package_name>
with the name of the package. The purge
option removes the package and its configuration files.
- Reinstall the Package:
sudo apt install <package_name>
This reinstalls the package with the default configuration.
9. Check Disk Space
Ensure that you have enough free disk space to perform the upgrade. Insufficient disk space can cause the upgrade process to fail.
df -h
This command shows the disk space usage for each partition. Make sure that the partition containing the /
directory has enough free space. As a rule of thumb, it’s better to have at least 10 GB of free space.
10. Inspect APT Configuration Files in /etc/apt/apt.conf.d/
Sometimes custom configurations within the /etc/apt/apt.conf.d/
directory interfere with the upgrade process. Incorrect proxy settings or pinned packages could cause issues.
- List Files in the Directory:
ls /etc/apt/apt.conf.d/
- Examine Each File: Use
nano
orcat
to view the contents of each file. Look for any unusual or incorrect settings.
sudo nano /etc/apt/apt.conf.d/99custom
- Comment Out or Remove Problematic Settings: If you find any settings that seem to be causing issues, comment them out by adding
//
at the beginning of the line, or remove the settings altogether. - Retry the Upgrade: After making changes, run
sudo apt update
and thensudo do-release-upgrade
again.
11. Examining and Modifying the /etc/apt/preferences
File
The /etc/apt/preferences
file is used to control the priority of different packages and repositories. Incorrect settings in this file can sometimes interfere with the upgrade process.
- Check if the File Exists:
ls /etc/apt/preferences
If the file doesn’t exist, it’s not causing the issue. 2. Examine the File Contents:
sudo nano /etc/apt/preferences
Look for any entries that might be pinning packages to specific versions or repositories.
3. Comment Out or Remove Problematic Entries: If you find any entries that seem to be causing issues, comment them out or remove them.
4. Retry the Upgrade: After making changes, run sudo apt update
and then sudo do-release-upgrade
again.
12. Directly Editing the /etc/os-release
File (Use with Caution)
This is a more advanced step and should be done with caution. The /etc/os-release
file contains information about the operating system, including its name and version. Sometimes, the upgrade tool relies on this file to determine the current version of the system. If the file is corrupted or contains incorrect information, it can cause the upgrade to fail.
- Back Up the File:
sudo cp /etc/os-release /etc/os-release.backup
- Edit the File:
sudo nano /etc/os-release
- Verify the Contents: Make sure that the file contains the correct information for Ubuntu 18.04. It should look something like this:
NAME="Ubuntu"
VERSION="18.04.6 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.6 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
- Correct Any Errors: If you find any errors, correct them and save the file.
- Retry the Upgrade: After making changes, run
sudo apt update
and thensudo do-release-upgrade
again.
13. Run the Upgrade with the -d
Flag (Development Release)
As a last resort, you can try running the upgrade with the -d
flag, which tells the upgrade tool to upgrade to the latest development release. This can sometimes bypass issues that are preventing the upgrade to the stable release.
sudo do-release-upgrade -d
Warning: This option is not recommended for production systems, as development releases may contain bugs and instability. However, it can be a useful troubleshooting step.
Important Considerations During the Upgrade
- Internet Connection: Ensure that you have a stable and reliable internet connection throughout the upgrade process.
- Power Supply: If you’re using a laptop, make sure it’s connected to a power supply to prevent interruptions due to battery drain.
- Monitor the Upgrade: Pay close attention to the output of the upgrade tool. If you see any error messages, note them down and investigate them.
- Be Patient: The upgrade process can take a significant amount of time, depending on your internet connection speed and the speed of your computer. Be patient and avoid interrupting the process.
Conclusion: Successfully Upgrading to Ubuntu 20.04
By systematically working through these troubleshooting steps, you should be able to resolve the ‘multiverse’ component error and successfully upgrade from Ubuntu 18.04 to Ubuntu 20.04. Remember to back up your data before making any major changes to your system. If you continue to experience issues, consult the Ubuntu community forums or seek help from a qualified Linux system administrator. At revWhiteShadow, we hope this guide, brought to you by revWhiteShadow for kts personal blog site, helps you upgrade efficiently and safely. Good luck!