Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Hacknet

An immersive, terminal-based hacking simulator · By Fellow Traveller

Linux version won't run (Solved)

A topic by lulzdoods created Jun 25, 2023 Views: 348 Replies: 3
Viewing posts 1 to 2
(1 edit)

The game won't launch on Linux, tried with 2 different distro that produce the same error.

[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for System.Console ---> System.TypeInitializationException: An exception was t
hrown by the type initializer for System.ConsoleDriver ---> System.Exception: Magic number is wrong: 542  at System.TermInfoReader.ReadHeader (System.Byte[] buffer, System.Int32& position) [0x00000] in <filename unknown>:0  
  at System.TermInfoReader..ctor (System.String term, System.String filename) [0x00000] in <filename unknown>:0  
  at System.TermInfoDriver..ctor (System.String term) [0x00000] in <filename unknown>:0  
  at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in <filename unknown>:0  
  at System.ConsoleDriver..cctor () [0x00000] in <filename unknown>:0  
  --- End of inner exception stack trace ---  at System.Console..cctor () [0x00000] in <filename unknown>:0  
  --- End of inner exception stack trace ---  at Hacknet.Game1..ctor () [0x00000] in <filename unknown>:0  
  at Hacknet.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0

The error "System.Exception: Magic number is wrong: 542" is a bug with mono + ncurses 6.1 new terminfo file format. Easiest workaround is to launch the game from a terminal with:

$ TERM=xterm ./Hacknet

After that, if you encounter the following error: "./Hacknet.bin.x86_64: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory" you'll need to either install the deprecated libgconf library or use the steam runtime (if steam is installed on your machine) as follow :

$ $HOME/.steam/steam/ubuntu12_32/steam-runtime/run.sh env TERM=xterm ./Hacknet

Thank you for the solution.  The game now runs fine.

Also for anyone else running ArchLinux, the needed obsolete package is in AUR named gconf ,if you don't have Steam installed (or don't want to run steam runtime)

Nice. I had trouble in the past compiling gconf from AUR but it seems to work fine now (briefly checked: simply compiled and extracted the library sofile+symlinks to the lib64 game directory from the compiled package).