Install Rust on uberspace

If you want to use the Rust language on your uberspace you will have to install it yourself. Fortunately that is pretty sraightforward.

You can download some tarballs and extract it from there but that’s boring! That’s why we install and compile it from source. This also makes updating a bit easier as you can do it from the command line. You have to clone the repository via git clone https://github.com/rust-lang/rust and then change into it. Unless you want to live on the bleeding edge you probably want to checkout the branch stable with git checkout stable.

Because gcc is too old you cannot call ./configure successfully. There are more up-to-date versions provided already, you can see them with ls -d /package/host/localhost/gcc*. Because I want to use the newer version for everything I updated my .zshrc (if you didn’t change your shell, use .bashrc instead) with the following lines:

export PATH=/package/host/localhost/gcc/bin:$PATH
export LD_LIBRARY_PATH=/package/host/localhost/gcc/lib64:$LD_LIBRARY_PATH

The last two lines are necessary to also point to the new libraries that came with gcc. Now you can finally call ./configure --prefix=$HOME and then make!

… almost. If you wait long enough, then you might notice that your process got killed because it took too much memory. What I did was simply restarting it, in the end it took about 7 attempts until it finally went through. After that you can make install and you’re all done.


Because you now have a git repository with the source code you can easily update the language. All you need to do is:

git pull
make install

Last modified:

Categories: install rust