Can't upgrade or install new applications on Ubuntu 18.04

Asked by Isaac on 2019-08-24

When I try to upgrade my applications via terminal using

                         $ sudo apt-get upgrade

I've got the following error msg:

                             dpkg: erro fatal irrecuperável, a abortar:
                                            a ler lista de ficheiros para o pacote 'xdg-user-dirs': Erro de entrada/saída
                             E: Sub-process /usr/bin/dpkg returned an error code (2)

 i.e. I have a 'xdg-usr-dirs': Input/Output Error

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
2019-08-24
Last reply:
2019-08-25
Manfred Hampl (m-hampl) said : #1

"Input/Output Error" can indicate a consistency problem on a hard disk partition.
I suggest that you run a file system check (fsck) on your root file system.
Eventually also deleting the offending file (I assume it's /var/lib/dpkg/info/xdg-user-dirs.list) can help.

Manfred Hampl (m-hampl) said : #2

I forgot to add:
After deletion of that file you should reinstall the xdg-user-dirs package.

Can you help with this problem?

Provide an answer of your own, or ask Isaac for more information if necessary.

To post a message you must log in.