Featured image of post Fixing PVE Virtual Machine Package Update Error: command 'apt-get update' failed: exit code 100

Fixing PVE Virtual Machine Package Update Error: command 'apt-get update' failed: exit code 100

While logging into the Proxmox VE virtual machine panel, you often encounter a series of error messages in the task log. The specific message is: TASK ERROR…

When logging into the Proxmox VE virtual machine panel, you may frequently see multiple error messages in the task log.

Fixing PVE Virtual Machine Package Update Error: command ‘apt-get update’ failed: exit code 100
The specific error message is: TASK ERROR: command ‘apt-get update’ failed: exit code 100.

In Proxmox VE, if you are using the Enterprise version (Proxmox VE Subscription), the system requires a valid subscription to access software updates and support. However, for personal users, an enterprise subscription is not necessarily required, as Proxmox VE also offers a free community version.

If you are a personal user using Proxmox VE for non-commercial purposes, consider using the community version. In the community version, you can obtain updates through the default software sources without needing to purchase an enterprise subscription.

Solution:

  1. Open a terminal in the virtual machine.
  2. Enter the following command:
1
sudo nano /etc/apt/sources.list

This will open the package source file. Then, press the delete key to remove all existing content.

  1. Paste the subscription link for personal users:
1
2
3
4
5
6
7
8
9
deb http://ftp.debian.org/debian bookworm main contrib
deb http://ftp.debian.org/debian bookworm-updates main contrib

# Proxmox VE pve-no-subscription repository provided by proxmox.com,
# NOT recommended for production use
deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription

# security updates
deb http://security.debian.org/debian-security bookworm-security main contrib

Then press Ctrl + O to save the file, followed by Enter to confirm.

Fixing PVE Virtual Machine Package Update Error: command ‘apt-get update’ failed: exit code 100
5. Similarly, modify the contents of /etc/apt/sources.list.d/ceph.list to: deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription. 6. Press Ctrl + X to save and exit the file. Comment out all lines in /etc/apt/sources.list.d/pve-enterprise.list. 7. Enter the following command:

1
sudo apt-get update

This will re-download the package database.

  1. Enter the following command:
1
sudo apt-get upgrade

This will upgrade all packages.

After completing these steps, you should be able to successfully update the package database.

Official Explanation:

This is the recommended repository for testing and non-production use. Its packages are not as heavily tested and validated. You don’t need a subscription key to access the pve-no-subscription repository.

We recommend configuring this repository in /etc/apt/sources.list.

File /etc/apt/sources.list:

1
2
3
4
5
6
7
deb http://ftp.debian.org/debian bookworm main contrib
deb http://ftp.debian.org/debian bookworm-updates main contrib
# Proxmox VE pve-no-subscription repository provided by proxmox.com,
# NOT recommended for production use
deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription
# security updates
deb http://security.debian.org/debian-security bookworm-security main contrib

Important Note:

Before modifying the software source configuration, it is advisable to back up the existing configuration file in case you need to restore it later. Additionally, for any system configuration changes, it is recommended to perform a thorough backup beforehand and proceed with caution during the process to avoid any unnecessary issues.

Licensed under CC BY-NC-SA 4.0