6

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: libGL.so.1: wrong ELF class: ELFCLASS32

I tried creating the file /etc/ld.so.conf.d/lib32.conf 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 libGL.so.1:

       libgl1-mesa-glx:amd64: /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
       libgl1-mesa-glx:amd64: /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0
0
12

Note that:

For Ubuntu 16.04 LTS and above, the AMD Catalyst or fglrx driver is no longer supported by AMD.

If you are using 16.04 LTS or above, you are very likely on your own. The following is only meant for the case described in the question. I can't guarantee that it would work on later versions.

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 libGL.so.1 should show:

libGL.so.1 (libc6) => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
libGL.so.1 (libc6) => /usr/local/lib/libGL.so.1

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/"
 ./run_some_32_bit_program
1
  • If you are using Wine on your System you will need those 32bit Libraries. Trying to uninstall the libgl1-mesa-glx:i386 will break your multi-arch System completely and reset it to a 64bit only System. It actually happened to me ... So I strongly discourage this solution. Mar 17 '17 at 11:18
0

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

Contents of /etc/ld.so.conf.d/local.conf:

/usr/lib64

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

You only have to do this once.

0

I was suffering all of a sudden the same problem after a kernel update. I was unable to login into the graphical interface. Running the "aticonfig" command I got this Error and I found it in the Xorg.0.log as well. I am running a Debian Jessie 64bit System with 32bit libraries for software like wine and skype. Removing the "libgl1-mesa-glx:i386" Package did uninstall skype and wine32 as well and it did not solve the issue.

I found that the AMD Driver Installer creates a wrong link to the 32bit library out of a misinterpretation of the System Architecture although it did apparently recognized the Architecture correctly within the Installer program.

Running the localization command for the library might give you the following information:

# find / -name libGL.so*
/usr/lib/i386-linux-gnu/libGL.so.1
/usr/lib/i386-linux-gnu/libGL.so
/usr/lib/i386-linux-gnu/libGL.so.1.2
/usr/lib/i386-linux-gnu/libGL.so.1.2.0
/usr/lib/libGL.so
/usr/lib/libGL.so.1.2
/usr/lib/libGL.so.1
/usr/lib64/libGL.so.1.2
/usr/lib64/libGL.so.1
/usr/lib64/libGL.so

But you will find that the Standard Libraries of the System in "/usr/lib" do link to library versions in "/usr/lib/i386-linux-gnu/" what makes the 32bit version of the libGL.so.1 library the default version. This link is created by the AMD Driver Installer out of a misinterpretation of the System Structure. This mistake comes from having a "/usr/lib64/" directory in the System. A 64bit System does not have a "/usr/lib64/" folder because all 64bit versions of the libraries are located in "/usr/lib/". So the Installer mistakes the System for a 32bit System and creates the link to the 32bit version of "libGL.so.1"

How can you fix it? - First run the uninstaller of the driver in "/usr/share/ati"

# ls -lah /usr/share/ati
-rw-r--r--   1 root root 2,4K oct 19 20:51 fglrx-install.log
-rwxr--r--   1 root root  18K oct 19 20:51 fglrx-uninstall.sh

This will remove all wrong links.

Even after this step I was already able to get a graphical login with a warning for not having the Propertary Driver.

  • Next you rename you "/usr/lib64/" directory to disable it.
    # cd /usr
    # ls -lah
    drwxr-xr-x 182 root root   40K oct 19 20:50 lib
    drwxr-xr-x   5 root root  4,0K oct 19 20:40 lib64
    # pwd
    /usr
    # mv lib64 lib64_2015-10-19
    # ls -lah
    drwxr-xr-x 182 root root   40K oct 19 20:50 lib
    drwxr-xr-x   5 root root  4,0K oct 19 20:40 lib64_2015-10-19
  • Then you go back to you AMD Driver Installer and run it again.

Now you will find that correct link to the 64bit version of libGL.so.1 was created.

# ls -lah /usr/lib/libGL.so.1.2
lrwxrwxrwx 1 root root 33 oct 19 20:50 /usr/lib/libGL.so.1.2 -> /usr/lib/fglrx/fglrx-libGL.so.1.2

Now you might be able to get a Graphical Login again as normal.

2
  • Moving /usr/lib without a good reason will leave your system crippled.
    – Braiam
    Mar 17 '17 at 13:28
  • please, note that this solution talks about a moving a /usr/lib64/ Directory which was wrongly created by the AMD Driver and that must not exist on a 64bit system because a 64bit System has its libraries just in the /usr/lib/ Directory. Mar 17 '17 at 14:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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