osu-lazer-linux-installer icon indicating copy to clipboard operation
osu-lazer-linux-installer copied to clipboard

Installing on Void Linux or other distros with libressl and without openssl

Open maybeetree opened this issue 5 years ago • 14 comments

I'm new to GitHub so sorry if this isn't the right place for this.

Some distros like Void Linux have libressl in place of openssl, which is required by dotnet. These are the steps I took for voidlinux, I hope that may be useful to others:

First, install dependencies using package manager: sudo xbps-install libgbm glfw SDL2-devel

Now try installing osu with start.sh . It should error out with dotnet: command not found

Now download dotnet core 3.1 sdk from Microsoft: https://docs.microsoft.com/en-us/dotnet/core/install/sdk?pivots=os-linux#download-and-manually-install

The instructions there have it install to your home directory. You can use a different one if you want.

open start.sh in a text editor and add these two lines after the first one:

export DOTNET_ROOT=$HOME/dotnet export PATH=$PATH:$HOME/dotnet

This will point the installer to your new dotnet installation. Save file and run again. Now the error should be "No usable version of libssl was found" You now need to install libssl 1.1 . Follow the guide here: https://help.dreamhost.com/hc/en-us/articles/360001435926-Installing-OpenSSL-locally-under-your-username

WebArchive: https://web.archive.org/web/20200103194748/https://help.dreamhost.com/hc/en-us/articles/360001435926-Installing-OpenSSL-locally-under-your-username

Now add the following lines to start.sh below the first two you added:

export PATH=$HOME/openssl/bin:$PATH export LD_LIBRARY_PATH=$HOME/openssl/lib export LC_ALL="en_US.UTF-8" export LDFLAGS="-L/home/username/openssl/lib -Wl,-rpath,/home/username/openssl/lib"

Make sure to substitute your unix username for 'username'. Of course do what you need if you installed openssl to a different path.

Save and run again. Now installing should error out with a big blob of red text saying something about ssl. Add these lines as well:

export DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0 export SSL_CERT_DI=/dev/null

I think that disable certificate validation during compilation, which may be a security risk, but I don't know of a better way. Save and install again, it should work now. Be patient, compiling takes a while.

maybeetree avatar Jan 03 '20 19:01 maybeetree

Thanks for writing that, if you are OK with it, I would add it to this repo's wiki so that all Void Users can easily find it.

Alexmitter avatar Jan 03 '20 19:01 Alexmitter

Yes, that is fine. Thank you very much!

maybeetree avatar Jan 03 '20 20:01 maybeetree

You'll find it here: https://github.com/Alexmitter/osu-lazer-linux-installer/wiki/Void-Linux:-Dependency-Installation Thank you for contributing, if you want to contribute/change anything else, feel free to make a pull request.

Alexmitter avatar Jan 03 '20 22:01 Alexmitter

I think GitHub is applying Markdown formatting to the wiki page, so the export lines appear all smushed together. Could you please enclose each of the three blocks of exports in three backticks (```)? That way it will format them as pieces of code. Sorry, I don't think it is possible to submit a pull request on a wiki page.

maybeetree avatar Jan 05 '20 19:01 maybeetree

Thank you for pointing that out, it is visually pleasing formatted now. At least I hope so. And yes, the current handling of the wiki is rather poor, I can see that there is a way to clone the wiki, but I don't know how to do a pull request on it either.

Alexmitter avatar Jan 05 '20 19:01 Alexmitter

I'm really not sure if installing openssl locally is required. Setting the environment variable CLR_OPENSSL_VERSION_OVERRIDE=47 makes dotnet and osu work fine, too.

toluschr avatar Apr 02 '20 16:04 toluschr

@maybeetree do you want to integrate the feedback from @toluschr ? Otherwise I would close the issue.

Alexmitter avatar May 07 '20 09:05 Alexmitter

Sorry, I've been a bit busy lately and didn't notice this comment. @toluschr, you look like you know what you're doing, so I trust that your solution works. @Alexmitter, below are the revised instructions (to preserve formatting, I think you would need to copy the markdown source: osulazer-installer-void-instructions.zip (zip because GitHub doesn't let you upload MD file))


Some distros like Void Linux have libressl in place of openssl, which is required by dotnet. These are the steps I took for voidlinux, I hope that may be useful to others:

First, install dependencies using package manager:
sudo xbps-install libgbm glfw SDL2-devel

Now try installing osu with start.sh . It should error out with dotnet: command not found

Now download dotnet core 3.1 sdk from Microsoft: https://docs.microsoft.com/en-us/dotnet/core/install/sdk?pivots=os-linux#download-and-manually-install

The instructions there have it install to your home directory. You can use a different one if you want.

open start.sh in a text editor and add these two lines after the first one:

export DOTNET_ROOT=$HOME/dotnet  
export PATH=$PATH:$HOME/dotnet

This will point the installer to your new dotnet installation. Save file and run again. Now the error should be "No usable version of libssl was found" Now add the following lines to start.sh below the first two you added:

export LC_ALL="en_US.UTF-8"  
export CLR_OPENSSL_VERSION_OVERRIDE=47

Save and run again. Now installing should error out with a big blob of red text saying something about ssl. Add these lines as well:

export DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0  
export SSL_CERT_DI=/dev/null

I think that disables certificate validation during compilation, which may be a security risk, but I don't know of a better way. Save and install again, it should work now. Be patient, compiling takes a while.

maybeetree avatar May 07 '20 13:05 maybeetree

@maybeetree I will try your new guide out, as soon as I'm back home again. Perhaps the "big red blob" will not show up when using the system ssl anymore.

toluschr avatar May 07 '20 15:05 toluschr

19:33:08

Seems to work just fine without the following

export DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0  
export SSL_CERT_DI=/dev/null

toluschr avatar May 07 '20 17:05 toluschr

Maybe @Alexmitter can include the following, to make the script 'just work'?

case "$(openssl version)" in
    LibreSSL*) export CLR_OPENSSL_VERSION_OVERRIDE=47;;
    *);;
esac

toluschr avatar May 08 '20 14:05 toluschr

I really hope i wont end like Bethesda's Todd Howard saying "it just works" but sure, I will add that snippet. In future, just make a quick PR, its just easier for everyone.

Edit: Was added with a4059c63d9dc7c5d4441e6f30ef5faf826a8d8d5

Alexmitter avatar May 08 '20 17:05 Alexmitter

I really hope i wont end like Bethesda's Todd Howard saying "it just works"

I put 'just works' in quotes, because it seemed like a hack to me, but it still works fine. It isn't that much of a hack, now that I think about it. It just specifies the OpenSSL version (LibreSSL was forked from OpenSSL at that version)

toluschr avatar May 08 '20 17:05 toluschr

Don't worry it was just a joke.

I have nothing against putting checks in the code to work around things like that to make it more simply on void. Again, just make a PR, I am open to everything.

Alexmitter avatar May 08 '20 17:05 Alexmitter