Software⏱️ 4 min read📅 2026-06-11

How to Fix: Continue on error when apt-get encounters an install unable to locate package issue

apt-get install with ignore missing package issue

Quick Answer: Use the --ignore-missing option with apt-get, e.g. sudo apt-get install --ignore-missing vim abcde php5-cli

Continue on error when apt-get encounters an install unable to locate package issue is a common problem that affects users who want to install multiple packages at once using apt-get. This issue occurs because apt-get is designed to stop installation if it can't find any of the required packages. However, this behavior can be frustrating for users who need to install multiple packages and don't want to see an error message for every missing package.

The problem arises from the fact that apt-get's default behavior doesn't allow for partial installations. When a package is missing, apt-get will stop the installation process entirely. This can lead to wasted time and frustration when trying to install multiple packages at once.

🛑 Root Causes of the Error

  • The primary reason for this issue is the design of apt-get's default behavior. APT (Advanced Package Tool) is designed to ensure that all packages are installed completely before proceeding with the next package. This means that if a package can't be found, the installation process will stop entirely.
  • An alternative reason could be due to a misconfigured apt sources list or a missing repository. If the apt sources list is not correctly configured or if a required repository is missing, apt-get won't be able to find the necessary packages.

🛠️ Step-by-Step Verified Fixes

Using the --ignore-missing option

  1. Step 1: To use this method, run the following command: `sudo apt-get install --ignore-missing vim abcde php5-cli`. This will tell apt-get to ignore missing packages and continue with the installation of the remaining packages.
  2. Step 2: Note that using the --ignore-missing option may lead to some packages not being installed correctly. It's recommended to use this method with caution and only when necessary.
  3. Step 3: Keep in mind that this method doesn't guarantee that all packages will be installed correctly. If you need to install a large number of packages, it's recommended to use the second method instead.

Using apt-mark hold

  1. Step 1: To use this method, run the following command: `sudo apt-get update && sudo apt-mark hold abcde`. This will mark the package 'abcde' as held and ensure that it's not removed by apt-get. Then, you can continue with the installation of the remaining packages using `sudo apt-get install vim php5-cli`.
  2. Step 2: This method is more reliable than using the --ignore-missing option but requires more steps. It's recommended to use this method when you need to install a large number of packages and want to ensure that all required packages are installed correctly.

🎯 Final Words

In conclusion, Continue on error when apt-get encounters an install unable to locate package issue can be frustrating for users who want to install multiple packages at once. However, there are two reliable methods to solve this problem: using the --ignore-missing option and using apt-mark hold. By following these steps, you should be able to successfully install your desired packages despite missing dependencies.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions