Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I was following the instructions on section 3.2 of this page.

Everything went well until step 8, which is to use sudo amdconfig --initial to create a new xorg.conf file, but I get the following error:

amdconfig: error while loading shared libraries: wrong ELF class: ELFCLASS32

I tried creating the file /etc/ with /usr/lib32 inside, as the second answer here suggested, and ran sudo ldconfig but nothing changed.

EDIT: Installed libgl1-mesa-glx:i386 and ran sudo ldconfig, and problem persisted even after rebooting.

EDIT2: Since step seven of the first link, after rebooting my top and side panels of unity and also the dash are missing, but I'm assuming this will be fixed when I finish the drivers installation.

EDIT3: Same error happens with fglrxinfo and glxinfo command (before following step 7 glx info was normal).

EDIT4: output of lspci -v | grep -A10 VGA (complete output)

00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) (prog-if 00 [VGA controller])
    Subsystem: Dell Device 0572
    Flags: bus master, fast devsel, latency 0, IRQ 45
    Memory at c1000000 (64-bit, non-prefetchable) [size=4M]
    Memory at b0000000 (64-bit, prefetchable) [size=256M]
    I/O ports at 4000 [size=64]
    Expansion ROM at <unassigned> [disabled]
    Capabilities: <access denied>
    Kernel driver in use: i915
01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Chelsea LP [Radeon HD 7730M] (prog-if 00 [VGA controller])
    Subsystem: Dell Device 0572
    Flags: bus master, fast devsel, latency 0, IRQ 16
    Memory at a0000000 (64-bit, prefetchable) [size=256M]
    Memory at c0000000 (64-bit, non-prefetchable) [size=256K]
    I/O ports at 3000 [size=256]
    Expansion ROM at c0040000 [disabled] [size=128K]
    Capabilities: <access denied>
    Kernel driver in use: fglrx_pci

EDIT: output of dpkg -S

       libgl1-mesa-glx:amd64: /usr/lib/x86_64-linux-gnu/mesa/
       libgl1-mesa-glx:amd64: /usr/lib/x86_64-linux-gnu/mesa/
share|improve this question

2 Answers 2

up vote 8 down vote accepted

The problem that we solved by commenting was that you were using 32-bits libraries in a 64-bits system.

wrong ELF class: ELFCLASS32

The ending of the class should have been 64, hence producing this error. The way to go is purging the 32-bits libraries then reinstalling the 64-bits.

sudo apt-get purge libgl1-mesa-glx:i386
sudo apt-get --reinstall install libgl1-mesa-glx

And refreshing our GNU linker:

sudo ldconfig

Once everything is ok, ldconfig -p | grep should show: (libc6) => /usr/lib/x86_64-linux-gnu/mesa/ (libc6) => /usr/local/lib/

If you ever need the 32-bits libraries for running 32-bits applications, you could do so installing the libgl1-mesa-glx:i386 package. But in this case remember to setting your LD_LIBRARY_PATH temporally to where the 32bits libraries are, so it won't mess up your other programs.

 export LD_LIBRARY_PATH="/path/to/library/"
share|improve this answer

Instead of editing the file directly, create a file called local.conf in the subdirectory /etc/ containing just the line /usr/local/lib. That is,

Contents of /etc/


Then run the ldconfig command. (This assumes that the file /etc/ contains the line include /etc/*.conf.)

You only have to do this once.

share|improve this answer

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.