[SOLVED] Packages not found

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
fsc
Level 1
Level 1
Posts: 12
Joined: Mon Jan 13, 2020 5:20 pm

[SOLVED] Packages not found

Post by fsc »

I have been using Mint for a couple of months (first Linux experience), and one of the few issues I met is that I cannot install some programs.
If, for example, I type in the terminal

Code: Select all

sudo apt install mpv
I get

Code: Select all

E: Impossibile trovare il pacchetto mpv
which is the Italian for "package mpv not found". It happens with lots of programs, like Chromium web browser and others; when I look for them in Software Center, I get no results. I am connected to the internet. Tell me if you need more information.
Thanks for your answers!
Last edited by fsc on Tue Jan 14, 2020 10:26 am, edited 2 times in total.

gm10
Level 20
Level 20
Posts: 11000
Joined: Thu Jun 21, 2018 5:11 pm

Re: Pakages not found

Post by gm10 »

Assuming you are still on a supported release (LM 18/19) and not an older one where the repositories have been shut down, run

Code: Select all

apt update
and try again. If it's still not found, go to the Software Sources tool and switch the base mirror or click the button to restore the default settings, click OK to refresh the cache and then try once more.

If there are any other error messages doing any of that, post the full output.
Tune up your LM 19+: ppa:gm10/linuxmint-tools

fsc
Level 1
Level 1
Posts: 12
Joined: Mon Jan 13, 2020 5:20 pm

Re: Packages not found

Post by fsc »

I am using Linux Mint 19.2 Cinnamon; if you need any other information, tell me and I'll tell you more. If I try to update, I get

Code: Select all

Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze       
Lettura informazioni sullo stato... Fatto
Tutti i pacchetti sono aggiornati.
Last phrase means "all packages are up-to-date".
Unluckily, when I try to open Software Sources, it asks for my password in a window; when I write it and press enter, the window closes and nothing else happens.

User avatar
kc1di
Level 15
Level 15
Posts: 5773
Joined: Mon Sep 08, 2008 8:44 pm
Location: Maine USA

Re: Packages not found

Post by kc1di »

please go to a teminal and copy and paste this command and post output.

Code: Select all

sudo grep -Erh ^deb /etc/apt/sources.list*
Easy tips : https://easylinuxtipsproject.blogspot.com/ Pjotr's Great Linux projects page.
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608

fsc
Level 1
Level 1
Posts: 12
Joined: Mon Jan 13, 2020 5:20 pm

Re: Packages not found

Post by fsc »

When I executed grep I got:

Code: Select all

deb http://repository.spotify.com stable non-free
deb http://packages.linuxmint.com tina main upstream import backport #id:linuxmint_main
deb http://archive.ubuntu.com/ubuntu bionic main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu bionic-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ bionic partner
Furthermore, I don't know whether this may be useful, but when I try to run Software Sources by typing

Code: Select all

mintsources
in a terminal, it asks for password and, once I write it, it gives:

Code: Select all

FileNotFoundError: [Errno 2] File o directory non esistente: '/etc/apt/sources.list.d'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 145, in apport_excepthook
    os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o640), 'wb') as f:
FileNotFoundError: [Errno 2] File o directory non esistente: '/var/crash/_usr_lib_linuxmint_mintSources_mintSources.py.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1891, in <module>
    Application().run()
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 870, in __init__
    self.read_source_lists()
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 996, in read_source_lists
    for file in os.listdir("/etc/apt/sources.list.d"):
FileNotFoundError: [Errno 2] File o directory non esistente: '/etc/apt/sources.list.d'
The only Italian phrase "File o directory non esistente" means "non existing file or directory".

gm10
Level 20
Level 20
Posts: 11000
Joined: Thu Jun 21, 2018 5:11 pm

Re: Packages not found

Post by gm10 »

fsc wrote:
Tue Jan 14, 2020 8:21 am

Code: Select all

*FileNotFoundError: [Errno 2] File o directory non esistente: '/etc/apt/sources.list.d'
Do you have a Timeshift snapshot from when things were working? Something went seriously wrong here, I think it would be best to revert the entire system if possible, because you may have broken more things.

If not, then run this:

Code: Select all

sudo mkdir /etc/apt/sources.list.d
followed by

Code: Select all

sudo mintsources
and optionally choose your mirrors. Update the apt cache and then at least the immediate problem will be fixed.
Tune up your LM 19+: ppa:gm10/linuxmint-tools

fsc
Level 1
Level 1
Posts: 12
Joined: Mon Jan 13, 2020 5:20 pm

Re: Packages not found

Post by fsc »

Creating the directory has not been a problem, but when I ran your second command, the output was this:

Code: Select all

Sources missing, generating default sources list!
<__main__.Mirror object at 0x7fd92cc67a58>
<__main__.Mirror object at 0x7fd92cc67b70>
<__main__.Mirror object at 0x7fd92cc67ba8>
Error '(7, '')' on url http://mirror.unlockforus.com/linuxmint/packages

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.719: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.719: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.719: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.719: gtk_list_store_set_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.719: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.719: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.719: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.720: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.720: gtk_list_store_set_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.720: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.720: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.720: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.720: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.720: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.720: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.720: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.720: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.720: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.720: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.720: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.721: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.721: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.721: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.721: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.721: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.721: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.721: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.721: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.721: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.721: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.721: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.721: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.721: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.721: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.721: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.721: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.721: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.721: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.721: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.721: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.721: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.721: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.721: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:47:56.721: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed
<__main__.Mirror object at 0x7fd92cc67a58>
<__main__.Mirror object at 0x7fd92cc67b70>
<__main__.Mirror object at 0x7fd92cc67ba8>
Error '(7, '')' on url http://mirror.unlockforus.com/linuxmint/packages

(mintSources.py:7061): Gtk-CRITICAL **: 14:49:36.189: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:49:36.189: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:49:36.189: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:49:36.189: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:49:36.189: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:49:36.189: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:49:36.189: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:49:36.189: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:49:36.189: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:49:36.189: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:49:36.189: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:49:36.189: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:49:36.189: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:49:36.189: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:49:36.189: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(mintSources.py:7061): Gtk-CRITICAL **: 14:49:36.189: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed
followed by about 200 other repetitions, with increasing times.
Anyway, after running your commands, Software Sources opens properly, and programs can be installed: thanks!

Unluckily I made my first Timeshift snapshot after the first problems occurred, just because I was concerned by them; anyway I haven't been using my computer for a long time, and I haven't installed many programs, so saving my files in a backup external hard drive and "reverting the system" seems an acceptable option for me, even if I don't understand what it means exactly: if you've got time and will, could you be more precise?

gm10
Level 20
Level 20
Posts: 11000
Joined: Thu Jun 21, 2018 5:11 pm

Re: Packages not found

Post by gm10 »

Those error messages can be ignored.

And with reverting I meant restoring a previous working Timeshift snapshot. But since you've got no good one available, I'd just leave things alone and hope that nothing else bad had happened other than you accidentally deleting that directory.
Tune up your LM 19+: ppa:gm10/linuxmint-tools

fsc
Level 1
Level 1
Posts: 12
Joined: Mon Jan 13, 2020 5:20 pm

Re: Packages not found

Post by fsc »

Thanks for everything! I hope one day I'll be able to return your favour.

Post Reply

Return to “Newbie Questions”