"General Error. General input/output error" when opening documents with Libreoffice

I'm running LibreOffice 4.2.5.2 on Ubuntu 14.04. Trying to open any document (at first only with large ones, but now all of them) returns either of the messages below:

General Error. General input/output error opening documents with Libreoffice

or

Locked for editing by Unknown User

or

The file is corrupt, should LibreOffice repair it?

LibreOffice 4.1.6, which came with the distribution upgrade, had the same bug. Deleting the lock files (which I tried) does not fix it.

Sending the "corrupt" files to my email, I can preview their contents without problems. I use LibreOffice only on Linux.


Solution 1:

This fixed the "General Error. General input/output error" problem for me after upgrading from Ubuntu 12.04 LTS to 16.04 LTS:

sudo apt install libreoffice

It seems like only a few of the LibreOffice packages were installed on the system after the upgrade. The above command installed some more of the packages.

Solution 2:

I guess after all this time you either gave up or found another solution, but here is some input for others who may have the same issue.

I also got this "General Error. General input/output error" message, and found a solution on another forum:

Empty the contents of these two files:

~/.config/libreoffice/4/user/basic/dialog.xlc
~/.config/libreoffice/4/user/basic/script.xlc

One easy way to to it is running these commands in a terminal:

rm ~/.config/libreoffice/4/user/basic/dialog.xlc
rm ~/.config/libreoffice/4/user/basic/script.xlc
touch ~/.config/libreoffice/4/user/basic/dialog.xlc
touch ~/.config/libreoffice/4/user/basic/script.xlc

..or you could navigate to the files using Nautilus, open them in an editor, remove content and save. Your choice :)

After this, LibreOffice opened my file as if nothing had happened.

I believe if that doesn't work it is also an option to just delete the entire ~/.config/libreoffice/ folder, as I think it will be recreated, but I did not test that. Make a copy first if you want to try.

Solution 3:

I just received this same error message, after some digging I found that my /tmp partition was full. I freed some space in /tmp and could then open my spreadsheet.

Note: This will only be applicable if you use a /tmp partition - if you do not then it could be caused by your root partition being full but I'm guessing you will have other issues if that is the case.