104

Actually I have installed the new Ubuntu 15.04 64bit, and when I'm trying to install Steam on it, there is a problem. In fact I have downloaded the deb package from steam website, installed it and when I start it nothing happens. I tried to start it from terminal and what I've got

$ steam
Running Steam on ubuntu 15.04 64-bit
STEAM_RUNTIME is enabled automatically
Installing breakpad exception handler for appid(steam)/version(0_client)
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
Durandal
  • 263

9 Answers9

115

This was originally a problem with Steam on Ubuntu 15.04/15.10. Steam bundles old libs and are colliding with mesa drivers, that is also why closed drivers aren't seeing this problem. Update: It might also be that you are missing some things. See other mchid's answer.

There is an open bug in Steam's github.

The current workaround is to remove the old lib version, at least until valve fixes the issue in their startup script or something like that.

So enter these folders and do this (ignore the x86_64 if you only have a 32bit system):

cd $HOME/.steam/steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu
mv libstdc++.so.6 libstdc++.so.6.bak
cd $HOME/.steam/steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu
mv libstdc++.so.6 libstdc++.so.6.bak

If you have problem with the directory above then you should try this:

Some people have the .steam/steam/ubuntu12_32, others have only .steam/ubuntu12_32. If you don't have these folders, find the correct location by checking where your steam is looking for the user profile:

$ fgrep config=  /usr/games/steam
config=$HOME/.steam

Use that to find your lib location:

[config value] + /ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu
   |
   \-> $HOME/.steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu

It worked for me... but please note that if some game required that old lib from the steam runtime, it may crash (that is why valve should fix this)

Edit 2015-08-22:

As Steam now has a link in the $HOME/.steam/root that always points to the correct Steam install directory, this command should work for everybody and it simpler for a fast fix:

find $HOME/.steam/root/ubuntu12_32/steam-runtime/*/usr/lib/ -name "libstdc++.so.6" -exec mv "{}" "{}.bak" \; -print

Also, please remember that on each steam runtime update, you will probably need to run this.

Edit 2016-02-16:

Also see the mchid reply below, simply doing:

sudo apt-get install libgl1-mesa-dri libgl1-mesa-dri:i386

might be enough to fix this.

Edit 2016-10-23:

For ubuntu 16.10 the command was updated to remove more files that are breaking mesa drivers, so this new command should work:

find $HOME/.steam/root/ubuntu12_32/steam-runtime/*/usr/lib/ \( -name "libstdc++.so.6" -o -name "libgpg-error.so.0"  -o -name "libxcb.so.1" -o -name "libgcc_s.so.1" \) -exec mv "{}" "{}.bak" \; -print

For NVIDIA closed source drivers, see Vincent's reply below.

Edit 2017-01-08:

Probably final edit, the latest steam linux update should fix most, if not all problems! finally! :D

Edit 2017-08-03:

Sadly, returning from vacation found that some recent update again broke steam. So if you get this when starting, just after update download:

process 23148: arguments to dbus_connection_ref() were incorrect, assertion "connection->generation == _dbus_current_generation" failed in file dbus-connection.c line 2688.

and then steam crash, then you are hitting this bug, reported as non-fatal, but it do crash steam on same distros. workaround is this:

ln -s ${HOME}/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/libdbus-1.so.3 ${HOME}/.local/share/Steam/ubuntu12_32/steam-runtime/pinned_libs_32/libdbus-1.so.3

good luck

higuita
  • 2,176
20

Fastfix (tested on Ubuntu 15.04)

mv ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/libgcc_s.so.1{,.disable}
mv ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6{,.disable}
18

The following is from Error in installing Steam on ubuntu 15.04 and is by far the easiest answer to this question (as noted above by tahtisilma). I would add that if you want to avoid the pain of having to use the command terminal each time, then you can edit the desktop file either on your desktop, by right clicking and selecting properties and then replacing the commmand in the desktop file with the following:

sh -c "LD_PRELOAD='/usr/$LIB/libstdc++.so.6' DISPLAY=:0 steam"  

Short version:

Start steam in the terminal using:

LD_PRELOAD='/usr/$LIB/libstdc++.so.6' DISPLAY=:0 steam

instead of just steam

Long version:

Steam can’t open nouveau_dri.so, the shared library responsible for communicating with the graphics driver. To check if the driver is OpenGL enabled run:

DISPLAY=:0 glxinfo | grep -i direct

The output should be:

direct rendering: Yes Running steam in debug mode:

DISPLAY=:0 LIBGL_DEBUG=verbose steam

Gives us the output where the following lines gives us hint:

libGL: OpenDriver: trying /usr/lib/i386-linux-gnu/dri/nouveau_dri.so
libGL: dlopen /usr/lib/i386-linux-gnu/dri/nouveau_dri.so failed     (/home/user/.local/share/Steam/ubuntu12_32/steam-   runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6: version `    GLIBCXX_3.4.20' not found (required by /usr/lib/i386-linux-  gnu/dri/nouveau_dri.so))

It seems that steam uses different version of libstdc++.so.6. Lets check which version steam uses:

ls -l ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6  

 lrwxrwxrwx 1 user user 19 Jul 18  2014  /home/user/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386- linux-gnu/libstdc++.so.6 -> libstdc++.so.6.0.18

So Steam loaded LibC6 with ABI version 18 where driver expects version 20.The solution is to tell OS to preload the proper LibC6 version using LD_PRELOAD variable:

LD_PRELOAD='/usr/$LIB/libstdc++.so.6' DISPLAY=:0 steam

The somewhat non-intuitive $LIB parameter gets expanded in ld.so to the right path based on the platform of the process being started (man 8 ld.so for details).

You can create script with the following content to run it instead of steam:

#!/bin/bash
# Export so all child processes are affected as well
  export LD_PRELOAD='/usr/$LIB/libstdc++.so.6'
  export DISPLAY=:0
#export LIBGL_DEBUG=verbose
steam

A better script could check if the global LibC6 version is newer than the one in STEAM_RUNTIME and only then LD_PRELOAD’s.

More details can be found on here. Note that I tested it on Debian and now it has been tested on Ubuntu vivid 15.04 and works fine.

8

This works fine for me under Ubuntu 15.04 64bits with proprietary driver NVIDIA version 346 :

LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib32/nvidia-346/:/usr/lib/nvidia-346/" steam
muru
  • 207,228
Vincent
  • 91
8

This is a simple fix.

According to the error message, you are missing the following files:r600_dri.so and swrast_dri.so

Run the following commands to install these missing files:

sudo apt-get update
sudo apt-get install libgl1-mesa-dri libgl1-mesa-dri:i386

The problem should now be solved.

Please post any additional errors.

mchid
  • 44,904
  • 8
  • 102
  • 162
1

These two lines from menasheh's comment on github issue works with Ubuntu 15.10:

export LD_PRELOAD='/usr/$LIB/libstdc++.so.6'
export DISPLAY=:0

Note that if Steam updates itself, you may need to enter these lines again.

Anwar
  • 77,855
1

Fix for Ubuntu 16.04, Xenial Xerus, 64-bit

I've only had this problem with Steam since upgrading to 16.04, it worked fine on 14.04. I tried all the fixes above for older versions of Ubuntu.

The second part of this solution worked for me.

$ sudo dpkg --add-architecture i386
$ sudo apt-get update
$ sudo apt-get install wget gdebi libgl1-mesa-dri:i386 libgl1-mesa-glx:i386 libc6:i386
$ wget http://media.steampowered.com/client/installer/steam.deb
$ sudo gdebi steam.deb

Now I'm running L4D2 in Ubuntu again - excellent!

0

Just ran into this issue on a fresh install of Ubuntu 18.04 LTS. Turns out the Steam runtime version of libgcc_s.so.1 was the culprit. Renaming the file fixed the issue for me:

$ cd ~/.steam/root/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/
$ mv libgcc_s.so.1 libgcc_s.so.1.bak
BrianD
  • 621
0

16.04 and later

IMG:  Steam can be install as a flatpak package in all currently supported versions of Ubuntu. Open the terminal and type:

sudo add-apt-repository ppa:alexlarsson/flatpak # required in 16.04 only, not in later releases
sudo apt update 
sudo apt install flatpak
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub com.valvesoftware.Steam

The first command to add ppa:alexlarsson/flatpak is not required in 18.04 and later because the flatpak package is in the default repositories.

Steam can be launched by clicking on its icon in the Dash or launched from the terminal with the following command:

flatpak run com.valvesoftware.Steam   

Many games require an online purchase, but some popular games, such as Team Fortress 2, are free to play. When searching in the store, be sure to narrow results by the SteamOS/Linux operating system. Not all Linux games are compatible with your system, so make sure you check the requirements before purchasing games.

karel
  • 122,292
  • 133
  • 301
  • 332