- Use apt-get to fix missing and broken packages
- Using apt-get to fix missing and broken packages
- Other methods
- Method 2:
- About the author
- Karim Buzdar
- Thread: How to install missing packages ?
- How to install missing packages ?
- Re: How to install missing packages ?
- Re: How to install missing packages ?
- Re: How to install missing packages ?
- Ошибка у вас зафиксированы сломанные пакеты
- Как исправить у вас зафиксированы сломанные пакеты?
- 1. Обновите списки пакетов
- 2. Установите битые пакеты
- 3. Очистите лишние пакеты
- 4. Используйте dpkg
- 5. Разрешите зависимости
- Выводы
- Оцените статью:
- Об авторе
- 8 комментариев
- How do I install missing packages in Linux?
- How do I install missing libraries in Linux?
- How do I install missing packages in Ubuntu?
- How do I install packages in Linux?
- Which command is used to install packages in Linux?
- Where are libraries stored in Linux?
- How do I install a shared library?
- How do I fix sudo apt-get update?
- How can I fix Ubuntu OS without reinstalling it?
- How install apt-get in Linux?
- How do I find packages in Linux?
- What is install in Linux?
- What are RPM packages in Linux?
- How do I install an RPM on Linux?
- How many versions are there of Linux?
Use apt-get to fix missing and broken packages
In this article, we will learn how to fix the missing dependencies and broken packages using the apt-get command. Note that, we have run the commands and procedure mentioned in this article on a Debian 10 system. The same procedure can be followed in Ubuntu and older Debian versions.
We will use the command-line Terminal for trying the solutions and fixing the problem. To open the Terminal application in Debian, hit the super key on the keyboard and search for it using the search bar that appears. When the search result appears, click on the Terminal icon to open it.
Using apt-get to fix missing and broken packages
Apt-get is a Terminal based package management tool used for installing, upgrading, and removing packages. Along with these features, it also has flags that can be used for fixing missing dependencies and broken packages.
Method 1
Use the “fix-missing” option with “apt-get update” to run the updates and ensure the packages are up to date and there is no new version available for the packages.
Once you are done with the update, execute the below command in order to force the package manager to find any missing dependencies or broken packages and install them.
Another approach to solving the broken package issue via apt-get is to edit the “/etc/apt/sources/list” file and adding sites with newer versions of packages available. Then running the “apt-get update” command to update the repository list.
If the above method does not fix the issue of broken dependencies and broken packages and still you are receiving the error, then try the following methods.
Other methods
Method 1:
In this method, we will use the “apt-get autoremove” and the “dpkg” in order to fix missing dependencies and broken packages.
1. Update the repository index by executing the below command in Terminal:
2. Next, execute the below command to clean out the local repository:
3. Execute the below command to remove all the unnecessary packages that are no longer needed:
The above command will display the unmet dependencies or broken package’s name.
4. Then try executing the below command in Terminal to force remove the broken package:
Method 2:
In the following method, we will use the “dpkg—configure” command in order to fix missing dependencies and broken packages.
Dpkg is a package management tool that can be used to install, remove and manage packages. Similar to apt-get, it can also help to fix broken packages and missing dependencies. If you receive some errors while installing or updating the packages, try the following solution with dpkg:
1. Execute the below command in the Terminal to reconfigure all the partially installed packages.
If the above command does not work, like in our case and you see similar results displaying the erroneous package, then try removing the package.
2. Execute the below command in Terminal in order to remove the erroneous package.
3. Then use the below command to clean out the local repository:
After trying any one of the above solutions, run the update command to ensure the dependencies are resolved and broken packages are fixed or removed.
Fixing the dependency and broken packages errors and then returning the system to the normal state may take hours. Sometimes it gets so complicated that when you finally fix it, you feel so lucky. We have presented some solutions regarding this error, so please give them a try. If you know some of the possible solutions we did not mention, please let us know in the comments.
About the author
Karim Buzdar
Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. He blogs at LinuxWays.
Источник
Thread: How to install missing packages ?
Thread Tools
Display
How to install missing packages ?
I was trying to install google chrome linux version on to my ubuntu system(8.04). During this operation, while correcting the dependencies of libraries , unknowingly i gave the answer ‘Y’ to one of the question.
As a result, it uninstalled many main packages like Nautilus Desktop,firefox and many others. Now i am able to login to desktop but the desktop is not fully loading with all panels and icos. only wall paper is getting displayed.
i am able to work in FailSafe mode terminal. Please let me know the command to give in terminal to install all missing important packages of Ubuntu 8.04 and fix all the broken and dependency issues.
Thanks for your support.
-Chinnaraj.
Re: How to install missing packages ?
Do you have any clue on the command to use to installing the missing packages ?
Re: How to install missing packages ?
Without knowing what was removed that caused all those packages to removed all at once . it’s to say what command would be needed.
Have you attempted so reinstall the packages you know to be missing ? I don’t know what terminal you are looking at so I don’t know if sudo apt-get install package name is an option. Example: sudo apt-get install nautilus
Last edited by Frogs Hair; February 27th, 2011 at 03:35 PM .
Re: How to install missing packages ?
Just try to re-install the ubuntu-dekstop package. Before trying to do so, search and fix any broken packages. Follow these commands, one-by-one.
Источник
Ошибка у вас зафиксированы сломанные пакеты
Во время установки программ с помощью пакетного менеджера apt в любом из дистрибутивов, использующих этот пакетный менеджер, вы можете столкнуться с ошибкой, что у вас зафиксированы сломанные пакеты. Это пакеты, которые не установились полностью потому что им не хватает зависимостей или процесс установки был по какой-либо причине прерван.
В этой статье мы рассмотрим что делать с такой ошибкой, как её исправить, а также я дам ссылки на другие материалы на сайте, которые помогут справится с проблемой.
Как исправить у вас зафиксированы сломанные пакеты?
1. Обновите списки пакетов
Возможно вам не удалось установить нужные пакеты потому что списки репозиториев устарели, и там ещё не было нужных пакетов. Для обновления списка пакетов выполните:
sudo apt update —fix-missing
2. Установите битые пакеты
После обновления списка пакетов из репозиториев может помочь установка битых пакетов. Этот шаг поможет особенно если вы устанавливали пакет с помощью dpkg и теперь нужно доустановить его зависимости с помощью пакетного менеджера. Для этого есть специальная команда:
sudo apt install -f
3. Очистите лишние пакеты
Установке могут мешать лишние пакеты, которые больше не нужны в системе. Для их удаления выполните:
sudo apt autoremove
Утилита отобразит список всех битых пакетов, которые не установлены, вы можете попытаться их удалить с помощью команды:
sudo dpkg —remove -force —force-remove-reinstreq имя_пакета
4. Используйте dpkg
Вместо apt вы можете использовать команду dpkg чтобы посмотреть какие пакеты вызывают проблему. Просто выполните:
sudo dpkg —configure -a
Команда покажет проблемные пакеты, а потом вы сможете их удалить той же командой:
sudo dpkg —remove -force —force-remove-reinstreq имя_пакета
5. Разрешите зависимости
Битые пакеты чаще всего появляются из-за того, что пакетный менеджер не может найти для них нужные зависимости. Если вам всё же очень нужно установить такой пакет, просто разрешите эти зависимости. Для этого можно скачать и установить их вручную или если вы уверенны, что зависимости в пакете указаны неверно, можно скачать его распаковать и удалить мешающие зависимости. Подробнее об этом читайте в этой статье.
Выводы
В этой небольшой статье мы рассмотрели что делать если в вашей системе появились битые пакеты и как их исправить. Здесь решение проблемы очень сильно зависит от вашей ситуации, но здесь приведены основные варианты решения, которые должны помочь вернуть пакетный менеджер к работе. Иногда рекомендуют удалить пакет вручную из базы данных dpkg /var/lib/dpkg/status, однако лучше этого не делать и найти путь решить проблему по другому, ручное редактирование подобных файлов может создать ещё больше проблем.
Нет похожих записей
Оцените статью:
Об авторе
Основатель и администратор сайта losst.ru, увлекаюсь открытым программным обеспечением и операционной системой Linux. В качестве основной ОС сейчас использую Ubuntu. Кроме Linux, интересуюсь всем, что связано с информационными технологиями и современной наукой.
8 комментариев
Вот почему я использую Fedora с DNF, за 5 лет использования даже не припомню случаев некорректной работы DNF. APT в Дебиан подобных дистрибутивах это сплошное разочарование.
Если бы все так было просто с зависимостями, что их через форсе принудительно установить, то это был бы не Линукс. Ниче, что система после таких манипуляций не работает? После ваших советов, новичек «уложит» систему точно.
Согласен. С Fedora бубен уже покрылся пылью. Чего все с этой Ubunto’й носятся.
dzentoo? это у меня на матунту бубен плесенью покрылся.
А ты говоришь не о убунту, а Gnome3. Мне его нескончаемые проблемы неведомы, Gnome2 — до сих пор рулит
Ничего не помогло. Постоянно пишет, что сломаны пакеты. к примеру хочу установить: apt-get install mariadb-server. Делаю как вы пишите.
Следующие пакеты имеют неудовлетворённые зависимости:
mariadb-server : Зависит: mariadb-server-10.1 (>= 1:10.1.29-6) но он не будет установлен
E: Невозможно исправить ошибки: у вас зафиксированы сломанные пакеты.
root@user-All-Series:
# sudo apt update —fix-missing
Сущ:1 http://lt.archive.ubuntu.com/ubuntu bionic InRelease
Чтение списков пакетов… Готово
Построение дерева зависимостей
Чтение информации о состоянии… Готово
Все пакеты имеют последние версии.
root@user-All-Series:
# sudo apt install -f
Чтение списков пакетов… Готово
Построение дерева зависимостей
Чтение информации о состоянии… Готово
Обновлено 0 пакетов, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено.
root@user-All-Series:
# sudo apt clean
root@user-All-Series:
# sudo apt autoremove
Чтение списков пакетов… Готово
Построение дерева зависимостей
Чтение информации о состоянии… Готово
Обновлено 0 пакетов, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено.
root@user-All-Series:
Источник
How do I install missing packages in Linux?
How do I install missing libraries in Linux?
Linux – how to find a missing library
- sudo apt-get install apt-file.
- sudo apt-file update.
- apt-file search file_name_to_search_for.
How do I install missing packages in Ubuntu?
Ubuntu fix broken package (best solution)
- sudo apt-get update –fix-missing.
- sudo dpkg –configure -a.
- sudo apt-get install -f.
- Unlock the dpkg – (message /var/lib/dpkg/lock)
- sudo fuser -vki /var/lib/dpkg/lock.
- sudo dpkg –configure -a.
How do I install packages in Linux?
To install a new package, complete the following steps:
- Run the dpkg command to ensure that the package is not already installed on the system: …
- If the package is installed already, ensure it is the version you need. …
- Run apt-get update then install the package and upgrade:
Which command is used to install packages in Linux?
Apt. The apt command is a powerful command-line tool, which works with Ubuntu’s Advanced Packaging Tool (APT) performing such functions as installation of new software packages, upgrade of existing software packages, updating of the package list index, and even upgrading the entire Ubuntu system.
Where are libraries stored in Linux?
By default, libraries are located in /usr/local/lib, /usr/local/lib64, /usr/lib and /usr/lib64; system startup libraries are in /lib and /lib64. Programmers can, however, install libraries in custom locations. The library path can be defined in /etc/ld.
How do I install a shared library?
Once you’ve created a shared library, you’ll want to install it. The simple approach is simply to copy the library into one of the standard directories (e.g., /usr/lib) and run ldconfig(8). Finally, when you compile your programs, you’ll need to tell the linker about any static and shared libraries that you’re using.
How do I fix sudo apt-get update?
Hash Sum Mismatch Error
This error can happen when fetching the latest repositories during ” apt-get update ” was interrupted, and a subsequent ” apt-get update ” is not able to resume the interrupted fetch. In this case, remove the content in /var/lib/apt/lists before retrying ” apt-get update “.
How can I fix Ubuntu OS without reinstalling it?
First of all, try to login with live cd and backup your data in an external drive. Just in case, if this method didn’t work, you can still have your data and reinstall everything! At the login screen, press CTRL+ALT+F1 to switch to tty1.
How install apt-get in Linux?
- Install. Using apt-get install will check the dependencies of the packages you want and install any that are needed. …
- Search. Use apt-cache search to find what’s available. …
- Update. Run apt-get update to update all your package lists, followed by apt-get upgrade to update all your installed software to the latest versions.
How do I find packages in Linux?
How do I see what packages are installed on Ubuntu Linux?
- Open the terminal application or log in to the remote server using ssh (e.g. ssh user@sever-name )
- Run command apt list –installed to list all installed packages on Ubuntu.
- To display a list of packages satisfying certain criteria such as show matching apache2 packages, run apt list apache.
What is install in Linux?
install command is used to copy files and set attributes. It is used to copy files to a destination of the user’s choice, If the user want to download and install a ready to use package on GNU/Linux system then he should use apt-get, apt, yum, etc depending on their distribution.
What are RPM packages in Linux?
RPM (Red Hat Package Manager) is an default open source and most popular package management utility for Red Hat based systems like (RHEL, CentOS and Fedora). The tool allows system administrators and users to install, update, uninstall, query, verify and manage system software packages in Unix/Linux operating systems.
How do I install an RPM on Linux?
The following is an example of how to use RPM:
- Log in as root , or use the su command to change to the root user at the workstation on which you want to install the software.
- Download the package you wish to install. …
- To install the package, enter the following command at the prompt: rpm -i DeathStar0_42b.rpm.
How many versions are there of Linux?
There are over 600 Linux distros and about 500 in active development.
Источник