Monday, March 13, 2023

Remove or tell aptitude to ignore broken install

Sometimes, you find that an error (always) occured everytime install a package from sudo apt install.|

As i experienced, whenever I installed Mendeley Desktop, i got error dependency to python, although already installed 2to3 and other hack things. After all, the mendeley desktop installation shown error (python dependency), but the app is run smoothly. 

Whenever I run the apt --fix-broken install

sudo apt --fix-broken install

always remove the application and I need to install it again with showing the dependency error.

This little trick can help us to solve the problem by marking the app as proper installed (not broken one)

- use nano or gedit to edit the dpkg status

sudo nano /var/lib/dpkg/status

- search for your package application, I show you my problem, and you can relate it to yours

Package: mendeleydesktop
Status: install ok unpacked
Priority: extra
Section: science
Installed-Size: 441604
Maintainer: Mendeley Desktop Team <desktop@mendeley.com>
Architecture: amd64
Version: 1.19.8
Replaces: mendeleydesktop (<= 1.19.8)
Depends: libc6, python, gconf2, desktop-file-utils
Description: Mendeley Desktop (paper management and sharing software)
 Mendeley Desktop is free academic software for managing and sharing research
 papers.
 .
 With Mendeley Desktop you can organize, search and share your documents.
 .
 A Mendeley account is required. You can sign up in Mendeley Desktop or at
 www.mendeley.com.
Homepage: http://www.mendeley.com


- change the dpkg status to install ok installed  (the first yellowed text)

- remove the dependency that makes error (I removed python from my list)

- save and exit

- now you can try again to execute sudo apt --fix-broken install

I extracted and try this information from https://superuser.com/a/95532/1780812