Who hasn’t come across an error while doing an update in Ubuntu? Update errors are common and plenty in Ubuntu and other Linux distributions based on Ubuntu. Here are some common Ubuntu update errors and their fixes.
This article is part of Ubuntu beginner series that explains the know-how of Ubuntu so that a new user could understand the things better.
In an earlier article, I discussed how to update Ubuntu. In this tutorial, I’ll discuss some common errors you may encounter while updating Ubuntu. It usually happens because you tried to add software or repositories on your own and that probably caused an issue.
There is no need to panic if you see the errors while updating your system.The errors are common and the fix is easy. You’ll learn how to fix those common update errors.
Before you begin, I highly advise reading these two articles to have a better understanding of the repository concept in Ubuntu.
Understand Ubuntu repositories
Learn what are various repositories in Ubuntu and how they enable you to install software in your system.
Understanding PPA in Ubuntu
Further improve your concept of repositories and package handling in Ubuntu with this detailed guide on PPA.
Error 0: Failed to download repository information
Many Ubuntu desktop users update their system through the graphical software updater tool. You are notified that updates are available for your system and you can click one button to start downloading and installing the updates.
Well, that’s what usually happens. But sometimes you’ll see an error like this:
Failed to download repository information. Check your internet connection.
That’s a weird error because your internet connection is most likely working just fine and it still says to check the internet connection.
Did you note that I called it ‘error 0’? It’s because it’s not an error in itself. I mean, most probably, it has nothing to do with the internet connection. But there is no useful information other than this misleading error message.
If you see this error message and your internet connection is working fine, it’s time to put on your detective hat and use your grey cells (as Hercule Poirot would say).
You’ll have to use the command line here. You can use Ctrl+Alt+T keyboard shortcut to open the terminal in Ubuntu. In the terminal, use this command:
sudo apt update
Let the command finish. Observe the last three-four lines of its output. That will give you the real reason why sudo apt-get update fails. Here’s an example:
Rest of the tutorial here shows how to handle the errors that you just saw in the last few lines of the update command output.
Error 1: Problem With MergeList
When you run update in terminal, you may see an error “problem with MergeList” like below:
E:Encountered a section with no Package: header, E:Problem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_precise_universe_binary-i386_Packages, E:The package lists or status file could not be parsed or opened.’
For some reasons, the file in /var/lib/apt/lists directory got corrupted. You can delete all the files in this directory and run the update again to regenerate everything afresh. Use the following commands one by one:
sudo rm -r /var/lib/apt/lists/*
sudo apt-get clean && sudo apt-get update
Your problem should be fixed.
Error 2: Hash Sum mismatch
If you find an error that talks about Hash Sum mismatch, the fix is the same as the one in the previous error.
W:Failed to fetch bzip2:/var/lib/apt/lists/partial/in.archive.ubuntu.com_ubuntu_dists_oneiric_restricted_binary-i386_Packages Hash Sum mismatch, W:Failed to fetch bzip2:/var/lib/apt/lists/partial/in.archive.ubuntu.com_ubuntu_dists_oneiric_multiverse_binary-i386_Packages Hash Sum mismatch, E:Some index files failed to download. They have been ignored, or old ones used instead
The error occurs possibly because of a mismatched metadata cache between the server and your system. You can use the following commands to fix it:
sudo rm -rf /var/lib/apt/lists/*
sudo apt update
Error 3: Failed to fetch with error 404 not found
If you try adding a PPA repository that is not available for your current Ubuntu version, you’ll see that it throws a 404 not found error.
W: Failed to fetch http://ppa.launchpad.net/venerix/pkg/ubuntu/dists/raring/main/binary-i386/Packages 404 Not Found E: Some index files failed to download. They have been ignored, or old ones used instead.
You added a PPA hoping to install an application but it is not available for your Ubuntu version and you are now stuck with the update error. This is why you should check beforehand if a PPA is available for your Ubuntu version or not. I have discussed how to check the PPA availability in the detailed PPA guide.
Anyway, the fix here is that you remove the troublesome PPA from your list of repositories. Note the PPA name from the error message. Go to Software & Updates tool:
In here, move to Other Software tab and look for that PPA. Uncheck the box to remove the PPA from your system.
Your software list will be updated when you do that. Now if you run the update again, you shouldn’t see the error.
Error 4: Failed to download package files error
A similar error is failed to download package files error like this:
In this case, a newer version of the software is available but it’s not propagated to all the mirrors. If you are not using a mirror, easily fixed by changing the software sources to Main server. Please read this article for more details on failed to download package error.
Go to Software & Updates and in there changed the download server to Main server:
Error 5: GPG error: The following signatures couldn’t be verified
Adding a PPA may also result in the following GPG error: The following signatures couldn’t be verified when you try to run an update in terminal:
W: GPG error: http://repo.mate-desktop.org saucy InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 68980A0EA10B4DE8
All you need to do is to fetch this public key in the system. Get the key number from the message. In the above message, the key is 68980A0EA10B4DE8.
This key can be used in the following manner:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68980A0EA10B4DE8
Once the key has been added, run the update again and it should be fine.
Error 6: BADSIG error
Another signature related Ubuntu update error is BADSIG error which looks something like this:
W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://extras.ubuntu.com precise Release: The following signatures were invalid: BADSIG 16126D3A3E5C1192 Ubuntu Extras Archive Automatic Signing Key
W: GPG error: http://ppa.launchpad.net precise Release:
The following signatures were invalid: BADSIG 4C1CBC1B69B0E2F4 Launchpad PPA for Jonathan French W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/precise/Release
All the repositories are signed with the GPG and for some reason, your system finds them invalid. You’ll need to update the signature keys. The easiest way to do that is by regenerating the apt packages list (with their signature keys) and it should have the correct key.
Use the following commands one by one in the terminal:
cd /var/lib/apt sudo mv lists oldlist sudo mkdir -p lists/partial sudo apt-get clean sudo apt-get update
Error 7: Partial upgrade error
Running updates in terminal may throw this partial upgrade error:
Not all updates can be installed
Run a partial upgrade, to install as many updates as possible
Run the following command in terminal to fix this error:
sudo apt-get install -f
Error 8: Could not get lock /var/cache/apt/archives/lock
This error happens when another program is using APT. Suppose you are installing some thing in Ubuntu Software Center and at the same time, trying to run apt in terminal.
E: Could not get lock /var/cache/apt/archives/lock – open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/
Check if some other program might be using apt. It could be a command running terminal, Software Center, Software Updater, Software & Updates or any other software that deals with installing and removing applications.
If you can close other such programs, close them. If there is a process in progress, wait for it to finish.
If you cannot find any such programs, use the following command to kill all such running processes:
sudo killall apt apt-get
This is a tricky problem and if the problem still persists, please read this detailed tutorial on fixing the unable to lock the administration directory error in Ubuntu.
Any other update error you encountered?
That compiles the list of frequent Ubuntu update errors you may encounter. I hope this helps you to get rid of these errors.
Have you encountered any other update error in Ubuntu recently that hasn’t been covered here? Do mention it in comments and I’ll try to do a quick tutorial on it.
In this article, you will learn how to fix some common update errors that occur frequently when you try to update your Ubuntu version.
Ubuntu is a popular and reliable operating system, but occasionally updates can fail or produce errors. These errors can range from minor issues that can be easily resolved, to more serious problems that may require more extensive troubleshooting. In this tutorial, we will discuss some common methods for fixing Ubuntu update errors, including an introduction to some of the tools and techniques that you can use to troubleshoot and resolve update issues.
Before diving into the specific steps for fixing update errors, it is important to understand a few key concepts and tools that will be useful in troubleshooting and resolving update issues on Ubuntu. These include:
The “apt” package manager: Ubuntu uses the “apt” package manager to install, update, and manage packages on the system. Apt is a powerful and flexible tool, but can also be a source of update errors if there are issues with the package repository or with the packages themselves.
The “apt-get” command: The “apt-get” command is a command-line tool for interacting with the apt package manager. You can use apt-get to install, update, and remove packages, as well as to troubleshoot and resolve update issues.
The “apt-cache” command: The “apt-cache” command is a command-line tool that allows you to view information about packages in the package repository, such as their dependencies, files, and descriptions. You can use apt-cache to investigate issues with specific packages and their dependencies.
The “apt-config” command: The “apt-config” command is a command-line tool that allows you to view and modify the configuration options for the apt package manager. You can use apt-config to investigate issues with the package repository or with the configuration of apt itself.
With these concepts and tools in mind, we can now move on to discussing some common methods for fixing update errors on Ubuntu.
Error with “Hash sum Mismatch” :
When checking for updates, you might end up getting a “Failed To Download Repository Information” error.
This problem affects particularly rapidly changing repositories, such as the development release.
In order to fix this issue, you would just need to remove all the content of the directory /var/lib/apt/lists. Run the following command in the terminal :
sudo rm -rf /var/lib/apt/lists/*
then run:
sudo apt-get update
Read: What you need to do to secure Ubuntu
Problem with MergeList error :
It is one of the most frequently occurring errors during an Ubuntu update (sudo apt-get update not working|sudo apt update not working for instance ). It can happen when using both the sudo apt-get update in terminal and Ubuntu Update Manager. The error text might look similar to the following:
E:Encountered a section with no Package: header,
E:Problem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_precise_universe_binary-i386_Packages,
E:The package lists or status file could not be parsed or opened.
Issue the following commands to fix the problem:
sudo rm -r /var/lib/apt/lists/*
sudo apt-get clean && sudo apt-get update
“Failed to Download Repository Information” Error :
This is a rather generic error that can pop up for any kind of error during an Ubuntu update. You might have added a PPA which is not responding or is no longer available. It might look like the following :
E:Unable to parse package file /var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_precise_multiverse_i18n_Index (1)
If this a PPA problem, you would just need to identify the PPA that is failing and remove it from sources file.
Read: How to speed up Linux
To fix this, just issue the commands below like you did above:
sudo rm -rf /var/lib/apt/lists/*
then run:
sudo apt-get update
Error “Failed to download package files error”
This can be solved easily by modifying the software sources to Main server.
Read: How to install and uninstall applications in Ubuntu ? A Beginner’s guide
It’s simple: just open : Software & Updates, go to download from and change download server to main server .
This change will make future downloads slightly slower, due to the fact the main server is busier than a local server. This should provide more stability and a longer up-time.
Could not get lock /var/cache/apt/archives/lock
This error occurs when APT is being used by another program. In case an installation from Ubuntu Software Center is ongoing and at the same time you are running apt in the terminal, this error can pop up and might look similar to the output below:
E: Could not get lock /var/cache/apt/archives/lock – open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/
Since you can close the software update once it completed so that the lock gets released. If the problem persists however, issue the following commands:
sudo rm /var/lib/apt/lists/lock
Read: How to fix ‘E: Could not get lock /var/lib/dpkg/lock’ Error in Ubuntu
If the command above did not solve this problem, try the command:
sudo killall apt-get
Partial upgrade error
When installing updates in the terminal, you might encounter this upgrade error :
You may want to execute the command below to try to fix this error:
sudo apt-get install -f
Error while loading shared libraries
This is rather an installation error and not an update error. In case you are trying to install a program directly from the source code, this error might pop up:
Read: How to fix high memory usage in Linux
error while loading shared libraries:
cannot open shared object file: No such file or directory
To fix this issue, try to issue the following command:
sudo /sbin/ldconfig -v
GPG error: The following signatures couldn’t be verified
This isn’t much of an error but rather a small configuration issue. It used to occur quite frequently with IGD( Intel Graphics Drivers ) when trying to add the PPA. The error might look similar to the output below :
W: GPG error: http://repo.mate-desktop.org saucy InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 68980A0EA10B4DE8
The solution would be is to look up the public key that was not available from the remote server. Copy the key from the message and run the following command:
sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys 68980A0EA10B4DE8
Once the key has been retrieved and added, issue an update again and you should be good to go.
Read: How to use the APT command on Ubuntu/Debian Linux systems
BADSIG error
The BADSIG error might resemble the output below :
W: GPG error: http://download.virtualbox.org lucid Release: The following signatures were invalid: BADSIG 54422A4B98AB5139 Oracle Corporation (VirtualBox archive signing key)
To fix this error, run the following commands in the terminal:
sudo apt-get clean
cd /var/lib/apt
sudo mv lists oldlist
sudo mkdir -p lists/partial
sudo apt-get clean
sudo apt-get update
If the issue occurs again however, open Nautilus as root and navigate to var/lib/apt then delete the “lists.old” directory. Afterwards, open the “lists” folder and remove the “partial” directory. Finally, run the above commands again.
If this does not work, copy the character shown in bold in the error message above and then issue the command below like you did in the previous section :
sudo apt-key adv –recv-keys –keyserver keyserver.ubuntu.com 54422A4B98AB5139
Another simpler way to fix the BADSIG GPG errors is via Y PPA manager.
First you would need to install it via the following commands :
sudo add-apt-repository ppa:webupd8team/y-ppa-manager
sudo apt-get update
sudo apt-get install y-ppa-manager
Then open it up by invoking :
And click on Advanced and then select Fix all GPG Badsig errors:
If you like the content, we would appreciate your support by buying us a coffee. Thank you so much for your visit and support.
Кто не встречал ошибок в процессе обновления Ubuntu? Ошибки обновления в Ubuntu и иных дистрибутивах Linux встречаются часто и не вызывают удивления. В статье описан ряд часто встречающихся ошибок и способы их решения.
Данная статья является частью серии, посвященной новичкам в Ubuntu, и она призвана помочь лучше понять работу с дистрибутивом.
В данном туториале мы рассмотрим часто встречающиеся ошибки, которые можно встретить при обновлении Ubuntu. Они зачастую происходят тогда, когда пытаешься добавить софт или репозитории самостоятельно.
Если во время обновления системы появляются ошибки, паниковать не стоит. Ошибки случаются часто и решения есть. Вы научитесь как решить часто встречающиеся ошибки.
Ошибка 0: Failed to download repository information
Многие пользователи Ubuntu обновляют систему через графическую программное средство обновления. Вам приходит оповещения, что стали доступными обновления для вашей системы и теперь можно нажать на кнопку для начала скачивания и установки.
Обычно так и происходит, но иногда можно увидеть подобную ошибку:
Скорее всего ошибка покажется странной, так как интернет работает, но вас все равно просят его проверить.
Заметили, что я назвал ее “Ошибка 0”? Это потому что это по сути не ошибка. То есть, скорее всего, она не связана с подключением к интернету. Тем не менее помимо этого путающего сообщения больше информации нет.
Если вы видите данное сообщение, а подключение к интернету в порядке, то значит пришло время надевать шляпу детектива и пошевелить мозгами.
Нам придется использовать командную строку. Для того чтобы ее быстро открыть можете воспользоваться сочетанием клавиш ctrl+alt+T. Исполните в ней данную команду:
sudo apt update
Дождитесь завершения процесса. Рассмотрите последние 3-4 строки вывода. Они покажут действительные причины ошибки sudo apt-get update. Вот пример:
Дальше туториал будет посвящен способам решения ошибок, указанных в нескольких последних строчках вывода командной строки.
Ошибка 1: Problem With MergeList
Когда вы запустите обновление в терминале, то можете увидеть ошибку “Problem With MergeList”:
E:Encountered a section with no Package: header, E:Problem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_precise_universe_binary-i386_Packages, E:The package lists or status file could not be parsed or opened.’
По какой-то причине файл в директории /var/lib/apt/lists сломался. Вы можете удалить все файлы в указанной директории и запустить обновление снова. Исполните указанные команды одна за другое:
sudo rm -r /var/lib/apt/lists/* sudo apt-get clean && sudo apt-get update
Проблемы должны исчезнуть
Ошибка 2: Hash Sum mismatch
Вы можете встретиться с ошибкой “Hash Sum mismatch”. Ее решение аналогично тому, что мы написали выше.
W:Failed to fetch bzip2:/var/lib/apt/lists/partial/in.archive.ubuntu.com_ubuntu_dists_oneiric_restricted_binary-i386_Packages Hash Sum mismatch, W:Failed to fetch bzip2:/var/lib/apt/lists/partial/in.archive.ubuntu.com_ubuntu_dists_oneiric_multiverse_binary-i386_Packages Hash Sum mismatch, E:Some index files failed to download. They have been ignored, or old ones used instead
Скорее всего ошибка происходит из-за несовпадения на серверах кэша метаданных. Для исправления ситуации используйте данные команды:
sudo rm -rf /var/lib/apt/lists/* sudo apt update
Ошибка 3: Failed to fetch with error 404 not found
Если вы попытаетесь добавить репозиторий, который недоступен в вашей текущей версии Ubuntu, то увидите ошибку 404 not found:
W: Failed to fetch http://ppa.launchpad.net/venerix/pkg/ubuntu/dists/raring/main/binary-i386/Packages 404 Not Found E: Some index files failed to download. They have been ignored, or old ones used instead.
Вы добавили PPA в надежде установить приложение, но оно недоступно для вашей версии Ubuntu, и появилась ошибка. Вот почему следует заранее проверять доступно ли PPA для вашей версии Ubuntu или нет. Как удостовериться, что для вашей версии есть PPA, можно посмотреть здесь.
Так или иначе решением данной проблемы является удаление проблемной PPA из списка репозиториев. Название PPA вы найдете в сообщении об ошибке. Зайдите в средство Software & Updates:
Здесь пройдите во вкладку Other Software и поищите PPA. Уберите галочку, чтобы PPA удалилась из системы.
Ваш список программ после этого обновится. Теперь, если вы снова запустите обновление, ошибка исчезнет.
Ошибка 4: Failed to download package files
В данной ситуации доступна новая версия программы, но эта версия не распространена на все зеркала. Если вы не используете зеркало, то решить эту проблему просто — сделайте источником программы основной сервер.
Пройдите в Software & Updates там измените сменить сервер с которого происходит скачивание на main (основной):
Ошибка 5: GPG error: The following signatures couldn’t be verified
Добавление PPA может также привести к оповещению “GPG error: The following signatures couldn’t be verified” во время обновления:
W: GPG error: http://repo.mate-desktop.org saucy InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 68980A0EA10B4DE8
Все что надо в данном случае сделать, так это добавить публичный код в систему. Возьмите ключ из сообщения. В сообщении выше это 68980A0EA10B4DE8.
Данный ключ можно использовать так:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68980A0EA10B4DE8
Как только ключ будет добавлен, запустите обновление и все должны быть в порядке.
Ошибка 6: BADSIG error
Еще одна знаковая ошибка при обновлении Ubuntu — это “BADSIG error”, которая выглядит примерно так:
W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://extras.ubuntu.com precise Release: The following signatures were invalid: BADSIG 16126D3A3E5C1192 Ubuntu Extras Archive Automatic Signing Key W: GPG error: http://ppa.launchpad.net precise Release: The following signatures were invalid: BADSIG 4C1CBC1B69B0E2F4 Launchpad PPA for Jonathan French W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/precise/Release
Все репозитории подписаны GPG, и по какой-то причине система считает их неверными. Необходимо обновить ключи подписей. Проще всего это сделать путем повторной генерации списка apt get (с ключами подписей) и он должен иметь верный ключ.
Используйте следующие команды одну за другой:
cd /var/lib/apt sudo mv lists oldlist sudo mkdir -p lists/partial sudo apt-get clean sudo apt-get update
Ошибка 7: Partial upgrade error
Обновление через терминал может привести к такому:
Not all updates can be installed Run a partial upgrade, to install as many updates as possible
Для исправления ошибки исполните в терминале данную команду:
sudo apt-get install -f
Ошибка 8: Could not get lock /var/cache/apt/archives/lock
Данная ошибка происходит, когда еще одна программа использует APT. Допустим вы устанавливаете что-то через Ubuntu Software Center и в одновременно пытается запустить apt в терминале.
E: Could not get lock /var/cache/apt/archives/lock – open (11: Resource temporarily unavailable) E: Unable to lock directory /var/cache/apt/archives/
Проверьте не использует ли apt другая программа. Это может быть команда в терминале, Software Center, Software Updater, Software & Updates или иной другой соф, который занимается установкой и удалением приложений.
Если можете такие программы закрыть, закрывайте. Если что-то в процессе, то дождитесь завершения.
Если ничего найти не можете, используйте данную команду для того, чтобы прекратить все подобные процессы:
sudo killall apt apt-get
Это хитрая проблема, так что придется попотеть. Если это не поможет, то рекомендуем эту статью.
Встречали ли вы другие ошибки при обновлении?
Так завершается обзор часто встречающихся ошибок при обновлении Ubuntu. Надеюсь данная статья поможет вам с ними справится.
Вы не встречали других ошибок при обновлении Ubuntu недавно, о которых здесь не говорится? Расскажите в комментариях.
For all its benefits, occasionally Ubuntu can throw some errors when updating the system that can confuse and even worry a new user. I recall the first time I had “broken packages” with a lack of experience – I ended up nuking the OS and reinstalling, vowing never to use the command line again. The reality is far less dramatic, especially now that Ubuntu has matured from the days of 8.04 when I first installed it.
What follows are common error messages and how to fix them with minimal fuss.
Package Hash Mismatch
As common as this sounds, Ubuntu will unfortunately produce this error generically, meaning it gives little information about the problem, should there not be an Internet issue. In order to diagnose this, return to the Terminal and type:
A long series of text will scroll across the screen, but within this will be the following line or similar:
W:Failed to fetch package:/var/lib/apt/lists/partial/in.archive.ubuntu.com_ubuntu_dists_oneiric_restricted_binary-i386_Packages Hash Sum mismatch W:Failed to fetch package:/var/lib/apt/lists/partial/in.archive.ubuntu.com_ubuntu_dists_oneiric_multiverse_binary-i386_Packages Hash Sum mismatch E:Some index files failed to download. They have been ignored, or old ones used instead
In order to fix this, you can enter this into the Terminal:
sudo rm -rf /var/lib/apt/lists/* sudo apt-get update
This will remove all the cached packages and force the system to re-download them again.
Failed to Download Repository Information
This error is more straightforward and usually due to a PPA that you have added which is no longer available or simply not responding.
If this a PPA issue, then simply identify which of the PPAs is failing and remove it from sources. Do this as above by entering:
Failed to Download Package Information
This is another straightforward package error. Simply go to the sources and change the source to the Main Server.
Changing this means that future downloads might be slightly slower, due to the main server being busier than a local one, but it should be more stable and have a longer up-time than local servers which can be occasionally patchy.
Partial Upgrade Error
When running an update within the Terminal, users can be presented with the following error:
Not all updates can be installed Run a partial upgrade, to install as many updates as possible
Run this command to fix the problem:
Could Not Get Lock /var/cache/apt/archives/lock
When another package is using apt, then this error will appear. To explain, perhaps you are installing a .deb package like Google Chrome and then decide to use the Terminal to install something else, like Chromium or Firefox, at the same time.
E: Could not get lock /var/cache/apt/archives/lock – open (11: Resource temporarily unavailable) E: Unable to lock directory /var/cache/apt/archives/
Usually you can wait for the .deb package to finish installing and simply close the Software Center or gdebi if you use this. However, if the problem continues, you can resolve it by entering the following within the Terminal:
sudo rm /var/lib/apt/lists/lock
If this should fail, you can kill the process via:
GPG Error: The Following Signatures Cannot Be Verified
This isn’t really an error as such, just a small matter of configuration. It used to happen a lot with Intel Graphics Drivers when adding the PPA. Trying to update via the Terminal will give:
W: GPG error: http://repo.mate-desktop.org saucy InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 68980A0EA10B4DE8
The solution is to get the public key in the system. Take the key from the message above and enter the following:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68980A0EA10B4DE8
Inevitably, this will change based on what you are trying to verify and trying to import, so use the above as a guide.
Hopefully, this will resolve a lot of errors that users experience and will help avoid dramatic re-installations. How do you solve errors within Ubuntu? Let us know in the comments section, especially if you have other methods.
Matthew Muller
Matt has worked in the tech industry for many years and is now a freelance writer. His experience is within Windows, Linux, Privacy and Android.
Subscribe to our newsletter!
Our latest tutorials delivered straight to your inbox
overview
There are two parts to your question:
- fixing temporary resolve messages
- fixing the package management issues
Temporary resolve
It is likely that this issue is either:
- temporary due to your Internet Service Provider not correctly forwarding internet naming (DNS) to either its or external DNS servers, or
- due to a change in your network has similarly blocked this naming — for example, new router/modem, reconfiguring a switch with a new configuration.
Lets look at the possible DNS resolving issues.
First, temporarily add a known DNS server to your system.
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null
Then run sudo apt-get update
.
If this fixes your temporary resolving messages then either wait for 24 hours to see if your ISP fixes the issue for you (or just contact your ISP) — or you can permanently add a DNS server to your system:
echo "nameserver 8.8.8.8" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null
8.8.8.8
is Google’s own DNS server.
source
Another example DNS server you could use is OpenDNS — for example:
echo "nameserver 208.67.222.222" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null
package-management issues
In addition to the temporary resolve issues — you have a few package management issues that need to be corrected — I’m assuming you have tried recently to upgrade from one Ubuntu version to the next recommended version — in your case from Natty (11.04) to Oneiric (11.10)
Open a terminal and type
sudo nano /etc/apt/sources.list
Look for lines that have your a different distribution name in the list than you were expecting — in your case — you have upgraded to oneiric
but you have another release name natty
For example, look for lines that look like deb http:/archive.canonical.com/ natty backports
Add a #
to the beginning of the line to comment it out — for example
#deb http:/archive.canonical.com/ natty backports
Save and re-run:
sudo apt-get update && sudo apt-get upgrade
You should not have any more release naming errors.
At the time of writing this, possible common release names include lucid
, maverick
, natty
, oneiric
, precise
, quantal
, raring
, saucy
, trusty
, utopic
and vivid
.
I get following error when trying to install anything with RVM:
Searching for binary rubies, this might take some time.
Found remote file https://rvm.io/binaries/ubuntu/13.04/x86_64/ruby-2.1.1.tar.bz2
Checking requirements for ubuntu.
Installing requirements for ubuntu.
Updating system..kshitiz password required for 'apt-get --quiet --yes update':
............................
Error running 'requirements_debian_update_system ruby-2.1.1',
showing last 15 lines of /home/kshitiz/.rvm/log/1400047196_ruby-2.1.1/update_system.log
++ /scripts/functions/logging : rvm_pretty_print() 78 > case "${TERM:-dumb}" in
++ /scripts/functions/logging : rvm_pretty_print() 81 > case "$1" in
++ /scripts/functions/logging : rvm_pretty_print() 83 > [[ -t 2 ]]
++ /scripts/functions/logging : rvm_pretty_print() 83 > return 1
++ /scripts/functions/logging : rvm_error() 117 > printf %b 'There has been error while updating '''apt-get''', please give it some time and try again later.
For 404 errors check your sources configured in:
/etc/apt/sources.list
/etc/apt/sources.list.d/*.list
n'
There has been error while updating 'apt-get', please give it some time and try again later.
For 404 errors check your sources configured in:
/etc/apt/sources.list
/etc/apt/sources.list.d/*.list
++ /scripts/functions/requirements/ubuntu : requirements_debian_update_system() 53 > return 100
Requirements installation failed with status: 100.
How can I fix this?
asked May 14, 2014 at 9:42
Kshitiz SharmaKshitiz Sharma
17.6k25 gold badges94 silver badges166 bronze badges
RVM
doesn’t behave well if apt-get update
has errors. If your apt
sources
have an invalid repository that gives 404 or GPG error, RVM
will refuse to work. This can be confusing because it happens even if the faulty repository has nothing to do with ruby
or RVM
.
The following fix worked for me (Ubuntu):
Run apt-get update
and see if there are any errors. Edit your sources.list
and precise.list
in /etc/apt
to remove the faulty repositories. Repeat until apt-get update
succeeds without any errors. Then try running RVM
.
answered May 14, 2014 at 9:42
Kshitiz SharmaKshitiz Sharma
17.6k25 gold badges94 silver badges166 bronze badges
8
You can try to skip the rvm updating system so apt-get won’t be called.
# Disable RVM from trying to install necessary software via apt-get
rvm autolibs disable
# Then try installing Ruby:
rvm install 2.4.0
See https://stackoverflow.com/a/16759839/1212791
answered Feb 16, 2017 at 23:02
0
I also had to remove failing repositories but I had hard time spotting them and removing them based on instructions here. So I found this link which explains exactly why this happens and how to remove failing repositories:
In short, run following to find failing repositories:
sudo apt-get update | grep "Failed"
An example output can be like this:
:~# apt-get update | grep "Failed"
W: Failed to fetch http://ppa.launchpad.net/upubuntu-com/web/ubuntu/dists/trusty/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://ppa.launchpad.net/upubuntu-com/web/ubuntu/dists/trusty/main/binary-i386/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
And finally use this command to remove the failing repo(s):
sudo add-apt-repository --remove ppa:{failing ppa}
for the example here it will look like this:
sudo add-apt-repository --remove ppa:upubuntu-com/web
answered Dec 15, 2014 at 14:20
MajiKMajiK
6377 silver badges10 bronze badges
1
Alternative, it is also possible to cut the crap in rvm. I edited requirements_debian_update_system() in file /usr/share/rvm/scripts/functions/requirements/ubuntu like this:
requirements_debian_update_system()
{
echo "*fake* apt-get update"
# __rvm_try_sudo apt-get --quiet --yes update ||
# {
# typeset __ret=$?
# case ${__ret} in
# (100)
# rvm_error "There has been error while updating 'apt-get', please give it some time and try again later.
#404 errors should be fixed for rvm to proceed. Check your sources configured in:
# /etc/apt/sources.list
# /etc/apt/sources.list.d/*.list
#"
# ;;
# esac
# return ${__ret}
# }
}
answered Dec 16, 2014 at 10:10
aannoaanno
6388 silver badges17 bronze badges
2
This happened to me as well when I was trying to install a version of Ruby as a non-sudoer user. However, when I logged in as my admin user (with sudo privileges) and ran sudo apt-get update | grep "Failed"
I would get no errors and, yet, rvm install x.x.x
would still result in asking for a password (when I ran rvm install
as the non-sudoer user.)
I was banging my head with this for a while because I didn’t want my rvm (regular user) user to have sudo privileges. Then after some putzing around on Google I figured out that I could log in as my admin user.
Go through the steps of installing RVM for that user (as per their documentation):
$ gpg —keyserver hkp://keys.gnupg.net —recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
$ curl -sSL https://get.rvm.io | bash -s stable
$ source ~/.rvm/scripts/rvm
Then (as the admin user) jump straight into installing the RVM required packages:
$ rvm requirements
at which point it asks for my sudo password and installs the required apt packages for the entire system after I enter my password.
Then I log off from server as admin user and log back in as rvm user (with no sudo privileges) and try to install a version of Ruby.
$ rvm install x.x.x
and now it works.
answered Sep 12, 2016 at 23:05
racl101racl101
3,5904 gold badges33 silver badges33 bronze badges
2
You don’t need of apt-get to install rvm and to use it !
Just curl (apt-get install curl)
Launch curl -sSL https://get.rvm.io | bash -s stable --ruby
and rvm install 2.1.1
or another ruby’s version and it works
gem update etc…
RVM will be independent of apt-get so you’ll have no longer issu.
For more informations : https://rvm.io/rvm/install
answered Jul 12, 2014 at 18:13
Alexis_userAlexis_user
4275 silver badges14 bronze badges
I had the same issue. If none of the other answers work try this. I ran the following command to fix it:
sudo apt-get -f install
Then I remembered that I failed installing a package earlier that day. What this command did was resolve the dependencies on that package and allowed RVM to do its thing.
answered Jul 30, 2015 at 0:32
karnskarns
5,2417 gold badges30 silver badges56 bronze badges
I just tried
sudo apt-get update and found some of them are failing; for example..
Err http://extras.ubuntu.com raring/main Sources
404 Not Found
I went ahead and deleted those items from the list here..
sudo gedit /etc/apt/sources.list
It worked!
answered Jul 12, 2014 at 17:58
I was getting an error similar to this while running curl -sSL https://get.rvm.io | bash -s stable --ruby
. It took a while but I finally realised that I had synaptic open: the installer couldn’t run because apt was locked
answered Sep 8, 2014 at 4:04
I was also getting this error when my working directory was inside a mounted dir.
The fix was just to:
cd ~
I figured this out by seeing this at the bottom of a sudo apt-get update
E: Unable to change to /path/to/my/current/directory/ - chdir (13: Permission denied)
answered Sep 10, 2015 at 3:44
I got the same error.I tried most of above answers but none works for me, so i just change server
- Goto directory etc/apt
- click on Sources.list
- Change the server to us or some else server
- Reload (it will update your cache from that server)
- Then run
sudo apt-get update
answered Apr 7, 2016 at 7:44
Zia QamarZia Qamar
1,6641 gold badge14 silver badges34 bronze badges
this problem caused in apt-get update
so you have to disable the PPA :
System Settings>Software & Updates>Other Software
then reinstall.
answered May 1, 2017 at 5:22
Eslam SaberEslam Saber
4995 silver badges11 bronze badges
In my case rvm missed some linux packages, which couldnt be installed without sudo. There were no apt-get install errors at all.
When running rvm install ruby x.x.x with sudo, rvm installed packages required to build ruby and it worked.
answered Oct 8, 2017 at 17:51
mmlnmmln
2,0843 gold badges24 silver badges32 bronze badges
Issue — requirements_debian_update_system ruby-2.2.2 error
I also had the same issue. I found info on this link
Click Here
I followed this and resolved my issue. Was able to install ruby as
rvm install 2.2
answered Feb 23, 2019 at 9:11
Arvind singhArvind singh
1,27215 silver badges15 bronze badges
1) Before installing ruby must be done update:
apt is preferred over apt-get for interactive use in recent Ubuntu versions and apt should fix by:
sudo apt update
sudo apt upgrade
Or with apt-get may be used —allow-releaseinfo-change
sudo apt-get --allow-releaseinfo-change update
2) After successfully installation, for example ruby-2.3.1:
rvm install 2.3.1
answered May 5, 2020 at 19:57
shilovkshilovk
10.8k17 gold badges72 silver badges72 bronze badges
apt install libc6:amd64 libc6:amd64 libc6 libc6-dev:amd64 libc6-dev libc-dev-bin libc-bin man-db libc-dev-bin libc6-dev:amd64
thats work fine for me ^^
Al-Mothafar
7,7407 gold badges70 silver badges100 bronze badges
answered Feb 18, 2017 at 16:34
The problem is with your sources configured in:
/etc/apt/sources.list
/etc/apt/sources.list.d/*.list
So to check the errors you have to run this command and need to find that which PPA is firing errors:
sudo apt-get update | grep "Failed"
Then to resolve this error you have to press the Windows key and need to search «Software & Updates».
Then open it and go into Other Software there you can see some URLs which is failed while update.
Then uncheck those URLs from this and close this window and then do
sudo apt-get update
Finally, you can install ruby with
rvm install 2.4
PS: You can change the version you want to install ruby.
answered Jan 28, 2021 at 14:14
0
- Печать
Страницы: [1] Вниз
Тема: Ошибка при apt-get update (Прочитано 4078 раз)
0 Пользователей и 1 Гость просматривают эту тему.

Glebl
Здравствуйте. Стала появляться ошибка при вводе команды apt-get update. В конце выдает:
Aborted (core dumped)
Ошибка начала появляться после попытки воспользоваться удалением вручную пакета ttf-mscorefonts-installer по способу указанному в этой теме. Удалить толком не получилось, зато повредился файл status. Порылся в интернет, нашел способ его восстановить и восстановил его, но теперь вот эта ошибка вылазиет.
Чтение списков пакетов… Готово
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh > /dev/null; fi'
E: Sub-process returned an error code
« Последнее редактирование: 07 Ноября 2017, 20:13:23 от Glebl »

ARTGALGANO
sudo mv /etc/apt/apt.conf.d/50appstream{,.bak}
sudo apt update
?

Glebl
sudo mv /etc/apt/apt.conf.d/50appstream{,.bak}
sudo apt update
?
Теперь вот так пишет:
Aborted (core dumped)
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh > /dev/null; fi'
E: Sub-process returned an error code
E: Не удалось получить доступ к файлу блокировки /var/lib/dpkg/lock - open (11: Ресурс временно недоступен)
E: Не удалось выполнить блокировку управляющего каталога (/var/lib/dpkg/); он уже используется другим процессом?

EvangelionDeath
Glebl, вспоминайте, какое ПО еще запустили (перезапуск может помочь, если ПО не в автозагрузке)
HP Pro 840 G3: Intel i5-6300U, 32GB DDR4 2133MHz, Intel 520, Intel Pro 2500 180GB/Ubuntu 22.04
Dell Latitude 5590: Intel i5-8350U, 16GB DDR4 2400MHz, Intel 620, Samsung 1TB/Ubuntu 22.04

Glebl
Glebl, вспоминайте, какое ПО еще запустили (перезапуск может помочь, если ПО не в автозагрузке)
При перезагрузке выскакивает 9 окон «Обнаружено ошибка в системной программе. Вы хотите сообщить о проблеме сейчас?»
Пользователь добавил сообщение 10 Ноября 2017, 10:49:22:
Содержание каталога crash:
итого 18424
-rw-r----- 1 gleb whoopsie 3074356 ноя 5 19:00 _opt_yandex_browser-beta_yandex_browser.1000.crash
-rw-rw-r-- 1 gleb whoopsie 0 ноя 5 19:00 _opt_yandex_browser-beta_yandex_browser.1000.upload
-rw------- 1 whoopsie whoopsie 0 ноя 5 19:00 _opt_yandex_browser-beta_yandex_browser.1000.uploaded
-rw-r----- 1 root whoopsie 461181 ноя 3 16:44 ttf-mscorefonts-installer.0.crash
-rw-r--r-- 1 root whoopsie 0 ноя 3 16:44 ttf-mscorefonts-installer.0.upload
-rw------- 1 whoopsie whoopsie 0 ноя 3 16:44 ttf-mscorefonts-installer.0.uploaded
-rw-r----- 1 root whoopsie 8967697 ноя 10 10:20 _usr_bin_appstreamcli.0.crash
-rw-r--r-- 1 root whoopsie 0 ноя 7 19:58 _usr_bin_appstreamcli.0.upload
-rw------- 1 whoopsie whoopsie 0 ноя 7 19:58 _usr_bin_appstreamcli.0.uploaded
-rw-r----- 1 root whoopsie 648672 ноя 3 23:20 _usr_bin_mousepad.0.crash
-rw-r--r-- 1 root whoopsie 0 ноя 3 23:20 _usr_bin_mousepad.0.upload
-rw------- 1 whoopsie whoopsie 0 ноя 3 23:20 _usr_bin_mousepad.0.uploaded
-rw-r----- 1 root whoopsie 146681 ноя 3 23:20 _usr_bin_sudo.0.crash
-rw-r--r-- 1 root whoopsie 0 ноя 3 23:20 _usr_bin_sudo.0.upload
-rw------- 1 whoopsie whoopsie 0 ноя 3 23:20 _usr_bin_sudo.0.uploaded
-rw-r----- 1 root whoopsie 2103580 ноя 7 20:22 _usr_bin_thunar.0.crash
-rw-r--r-- 1 root whoopsie 0 ноя 3 17:35 _usr_bin_thunar.0.upload
-rw------- 1 whoopsie whoopsie 0 ноя 3 17:35 _usr_bin_thunar.0.uploaded
-rw-r----- 1 gleb whoopsie 2257454 ноя 8 14:40 _usr_bin_thunar.1000.crash
-rw-rw-r-- 1 gleb whoopsie 0 ноя 8 14:40 _usr_bin_thunar.1000.upload
-rw------- 1 whoopsie whoopsie 0 ноя 8 14:40 _usr_bin_thunar.1000.uploaded
-rw-r----- 1 root whoopsie 18361 ноя 10 10:20 _usr_bin_unattended-upgrade.0.crash
-rw-r----- 1 root whoopsie 1109608 ноя 4 16:12 _usr_sbin_NetworkManager.0.crash
-rw-r--r-- 1 root whoopsie 0 ноя 4 16:12 _usr_sbin_NetworkManager.0.upload
-rw------- 1 whoopsie whoopsie 0 ноя 5 08:08 _usr_sbin_NetworkManager.0.uploaded
-rw-r----- 1 root whoopsie 29191 ноя 3 17:03 _usr_sbin_update-apt-xapian-index.0.crash
-rw-r--r-- 1 root whoopsie 0 ноя 3 17:03 _usr_sbin_update-apt-xapian-index.0.upload
-rw------- 1 whoopsie whoopsie 0 ноя 3 17:03 _usr_sbin_update-apt-xapian-index.0.uploaded
-rw-r----- 1 gleb whoopsie 27974 ноя 3 17:27 _usr_share_oneconf_oneconf-service.1000.crash
-rw-rw-r-- 1 gleb whoopsie 0 ноя 3 17:03 _usr_share_oneconf_oneconf-service.1000.upload
-rw------- 1 whoopsie whoopsie 0 ноя 3 17:03 _usr_share_oneconf_oneconf-service.1000.uploaded
« Последнее редактирование: 10 Ноября 2017, 11:38:23 от Glebl »

ReNzRv
sudo lsof -t +D /var/lib/dpkg | sudo xargs kill

Glebl
sudo lsof -t +D /var/lib/dpkg | sudo xargs kill
Выдало это:
Usage:
kill [параметры] <pid> [...]
Options:
<pid> [...] send signal to every <pid> listed
-<signal>, -s, --signal <signal>
specify the <signal> to be sent
-l, --list=[<signal>] list all signal names, or convert one to a name
-L, --table list all signal names in a nice table
-h, --help display this help and exit
-V, --version output version information and exit
For more details see kill(1).
При sudo apt update выскакивает «Обнаружено ошибка в системной программе»
И в терминале также пишет:
Aborted (core dumped)
Содержимое crash:
Чтение списков пакетов… Готово
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh > /dev/null; fi'
E: Sub-process returned an error code
_usr_bin_appstreamcli.0.crash

ARTGALGANO
grep -R appstream /etc/apt/*

Glebl
grep -R appstream /etc/apt/*
Вернул это:
/etc/apt/apt.conf.d/50appstream_:## This file is provided by appstreamcli(1) to download DEP-11
apt update все также выдает
/etc/apt/apt.conf.d/50appstream_: "if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh > /dev/null; fi";
/etc/apt/apt.conf.d/50appstream.bak:## This file is provided by appstreamcli(1) to download DEP-11
/etc/apt/apt.conf.d/50appstream.bak: "if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh > /dev/null; fi";
Чтение списков пакетов… Готово
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh > /dev/null; fi'
E: Sub-process returned an error code

ARTGALGANO
sudo rm /etc/apt/apt.conf.d/50appstream_
sudo apt update

EvangelionDeath
ARTGALGANO, у вас все поблемы решаются удалением «ненужного» ? Может тогда еще и систему переустановить?
Glebl,
sudo apt-get purge libappstream3
dpkg -l | awk '/^rc/ {print $2}' | sudo xargs dpkg -P
HP Pro 840 G3: Intel i5-6300U, 32GB DDR4 2133MHz, Intel 520, Intel Pro 2500 180GB/Ubuntu 22.04
Dell Latitude 5590: Intel i5-8350U, 16GB DDR4 2400MHz, Intel 620, Samsung 1TB/Ubuntu 22.04

Glebl
sudo apt-get purge libappstream3
dpkg -l | awk ‘/^rc/ {print $2}’ | sudo xargs dpkg -P
Спасибо, но я уже удалил как мне ARTGALGANO написал, проблема исчезла. Это плохо, что удалил?

ARTGALGANO
EvangelionDeath, зачем переустановить? я предложил удалить 2 левый файл, а вы сразу весь libappstream.
Glebl, можете вернуть 50appstream назад
sudo mv /etc/apt/apt.conf.d/50appstream{.bak,}
sudo apt update

EvangelionDeath
но я уже удалил как мне ARTGALGANO написал, проблема исчезла. Это плохо, что удалил?
это неправильно. На всякий еще и удалите само ПО
Пользователь добавил сообщение 10 Ноября 2017, 13:10:13:
EvangelionDeath, зачем переустановить? я предложил удалить 2 левый файл, а вы сразу весь libappstream.
Файлы не «левые», а притянуты самим libappstream
HP Pro 840 G3: Intel i5-6300U, 32GB DDR4 2133MHz, Intel 520, Intel Pro 2500 180GB/Ubuntu 22.04
Dell Latitude 5590: Intel i5-8350U, 16GB DDR4 2400MHz, Intel 620, Samsung 1TB/Ubuntu 22.04

Glebl
это неправильно. На всякий еще и удалите само ПО
Хорошо, всем спасибо. В итоге восстановил 50appstream и сделал так:
sudo apt-get purge libappstream3
dpkg -l | awk ‘/^rc/ {print $2}’ | sudo xargs dpkg -P
- Печать
Страницы: [1] Вверх