Ubuntu – Failure to startx on Ubuntu 14.04 after security update – missing libXfont.so.1

aptlinuxstartxUbuntuupgrade

I had Ubuntu 14.04 running perfectly on my system and then it underwent a recommended security update. I let it update while I was at work and when I returned I found a black screen stating, "No init found" and "mount: mounting /dev/mapper/ubuntu-root on /root failed: Invalid argument". I followed some guides and ran the following commands:

ls /dev/sd*
sudo apt-get install lvm2
sudo pvscan
sudo vgscan
sudo vgchange -a y ubuntu-vg
sudo fsck /dev/ubuntu-vg/root

After running those commands and rebooting, my Linux system was back up and running again; however, not quite like it was before. It starts up into command line mode (without GUI) and asks for my username and password. When I log in and try "startx" I get the following:

user@home-pc:~$ startx
xauth:  timeout in locking authority file /home/user/.Xauthority
xauth:  timeout in locking authority file /home/user/.Xauthority

/usr/bin/X: error while loading shared libraries: libXfont.so.1: cannot open shared object file: No such file or directory
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
xauth:  timeout in locking authority file /home/user/.Xauthority
user@home-pc:~$ 

I get the same message when I try "sudo startx". I believe this error is due to the symbolic link that is used to identify the "libXfont.so.1" file, but I don't know how to fix this problem. I already tried running "sudo apt-get update && sudo-apt-get dist-upgrade" in hopes that this would fix or finish the upgrade and/or installing of the security update, but this didn't fix the problem. Does anyone have any idea on what is going on or how I can fix this?

Best Answer

Just a tip: try to locate libXfont.so.1 or libXfont.so. If it's located make a symlink to it:

ln -s `locate libXfont.so.1 | line` /usr/lib/x86_64-linux-gnu/

As mikeserv suggested below, quick and dirty fix is to find libXfont.so.N and make symlink libXfont.so.1 >> libXfont.so.N.

You can also check if X requires some other shared libraries by issuing ldd /usr/bin/X.

To summarize chat discussion: issue was fixed by:

sudo apt-get remove --purge libxfont1
sudo apt-get install libxfont1 xorg
sudo rm ~/.Xauthority
reboot
Related Question