Skip to content

Instantly share code, notes, and snippets.

@marcogrcr
Created December 2, 2023 09:15
Show Gist options
  • Save marcogrcr/f924c35a498bb8baa5b51c2f86050247 to your computer and use it in GitHub Desktop.
Save marcogrcr/f924c35a498bb8baa5b51c2f86050247 to your computer and use it in GitHub Desktop.
rtx-in-ubuntu.md

When using rtx in Ubuntu 22.04, take the following into account:

dotnet

Installation works out of the box via the asdf-dotnet plugin.

rtx install dotnet@8.0.100

However, you'll need to update a few environment variables so vscode can recognize it:

.bashrc

# opt-out of .NET telemetry
DOTNET_CLI_TELEMETRY_OPTOUT=1

# set DOTNET_ROOT, PATH, and MSBuildSDKsPath for vscode
rtx_update_dotnet_home() {
  local dotnet_path="$(rtx which dotnet 2> /dev/null)"
  if [[ -n "${dotnet_path}" ]]; then
    export DOTNET_ROOT="$(dirname "$(realpath "${dotnet_path}")")"
    export PATH=$DOTNET_ROOT:$PATH
    local dotnet_version="$($dotnet_path --version)"
    export MSBuildSDKsPath="$DOTNET_ROOT/sdk/$dotnet_version/Sdks"
  fi
}

rtx_update_dotnet_home

nodejs

This works out of the box.

rtx install node@lts-iron

python

You'll need to run install the packages in the pyenv suggested build environment first:

sudo apt update; sudo apt install build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev curl \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev

Then install python

rtx install python@3.12.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment