Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to install X on my archlinux home desktop. I get this error when trying to start it (startx/xinit):

[root@computer ~]# startx
xauth: file /root/.Xauthority does not exist
xauth: file /root/.Xauthority does not exist

/usr/bin/X: /usr/lib/libz.so.1: version 'ZLIB_1.2.5.2' not found (required by /usr/lib/libfontenc.so.1)
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

I googled around and asked in #archlinux irc, but couldn't resolve the issue.

share|improve this question
useradd -m -g users -G audio,lp,optical,storage,video,wheel,games,power,scanner -s /bin/bash username cp /etc/skel/.xinitrc ~/.xinitrc create a user and add that user to the default groups and do a startx. don't start x with root. Try if that works. –  user14039 Mar 9 '12 at 3:25
add comment

migrated from serverfault.com Mar 9 '12 at 2:32

This question came from our site for professional system and network administrators.

2 Answers

up vote 4 down vote accepted

Here's what I'd do: Run ldd /usr/bin/Xorg

You should get a line that looks like this:

libz.so.1 => /usr/lib/libz.so.1 (0xb7357000)

If ldd claims that it can't resolve what file libz.so.1 is in, then uninstall and reinstall zlib:

pacman -R -f zlib 
pacman -S zlib

If ldd can find a specific libz.so.1, then check to see if that file constitutes a broken symbolic link:

ls -l /usr/lib/libz.so.1

(Or whatever ldd told you that libz.so.1 resolves to).

On my Arch boxes, /usr/lib/libz.so.1 is a symbolic link of libz.so.1.2.6 . If /usr/lib/libz.so.1 links to some weird place, like a home directory, track down why - that shouldn't happen.

Ensure that whatever file that ldd resolves libz.so.1 to actually exists, and has contents. I get this:

261 % file libz.so.1.2.6
libz.so.1.2.6: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=0xb32fb568a025a99ed67220243b487b93ae8ef948, stripped

If the link exists, but the linked-to libz.so.1.2.6 doesn't exist, perhaps you can do the two pacman command sequence above and get everything back. I guess I'd advise against just doing the two pacman commands, until you understand what's going on. Something must have changed, unless this is a new installation, and somehow the zlib package didn't get installed.

share|improve this answer
Thank you. That helped me out. –  gits1225 Mar 9 '12 at 23:11
add comment

Upon executing startx in the terminal, I got an identical error message. I fixed it bypacman -Sy zlib, which updated the zlib package. That fixed it for me. I'm very new to arch however, so this may not be the best solution.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.