Debian – Install steamcmd on Debian 9 Stretch

debiansoftware installation

I'm trying to install steamcmd on Debian 9. I believe it's this package:
https://packages.debian.org/stretch/steamcmd

However I get a "package not found" error when using "apt-get install" because I need to add the non-free repository. I tried adding "non-free" to every line of the repository file, I tried adding new ones I found on internet but nothing is working, plus I found steamcmd on many places and I have no idea if one's better than another or that one is official, like these for example that I'm not even sure if they're the same:
https://launchpad.net/debian/+source/steamcmd/0~20130205-1
https://launchpad.net/debian/+source/steamcmd

Can anyone tell help me getting this in the apt-get repository so I can install it?

Best Answer

You should add the non-free component to your sources.list

edit your sources.list

sudo apt edit-sources

as follows:

deb http://deb.debian.org/debian stretch main contrib non-free
deb-src http://deb.debian.org/debian stretch main contrib non-free

deb http://deb.debian.org/debian stretch-updates main contrib non-free
deb-src http://deb.debian.org/debian stretch-updates main contrib non-free

deb http://security.debian.org/ stretch/updates main contrib non-free
deb-src http://security.debian.org/ stretch/updates main contrib non-free

save then run:

sudo dpkg --add-architecture i386
sudo apt update
sudo apt install steamcmd

Check the package:

$ apt-cache search steamcmd
steamcmd - Command-line interface for Valve's Steam
$apt-cache policy steamcmd
steamcmd:i386:
  Installé : (aucun)
  Candidat : 0~20130205-1
 Table de version :
     0~20130205-1 500
        500 http://deb.debian.org/debian stretch/non-free i386 Packages
Related Question