asdf gcloud ERROR: gcloud failed to load: No module named ‘_sqlite3’

Trying to use a gcloud asdf installation it fails with the error:

gcloud version
ERROR: gcloud failed to load: No module named '_sqlite3'

After installing various components (readline, tk etc) the last one to install to make gcloud work is liblzma-dev (sudo apt install liblzma-dev)

Then gcloud works

gcloud version
Google Cloud SDK 420.0.0
bq 2.0.86
bundled-python3-unix 3.9.16
core 2023.02.24
gcloud-crc32c 1.0.0
gsutil 5.20
Updates are available for some Google Cloud CLI components.  To install them,
please run:
  $ gcloud components update

asdf and terraform (or vault or packer)

Using the asdf version manager to manage versions of various binaries like terraform, vault or packer is easily done by following the instructions below:

  1. Download and install asdf if you haven’t got it already (https://asdf-vm.com/#/core-manage-asdf)
  2. If you want to install the latest version of terraform for example do the following:
asdf plugin add terraform
asdf install terraform latest
asdf global terraform 0.14.9
asdf list
terraform
  0.14.9
terraform --version
Terraform v0.14.9

Erlang and Elixir with asdf in Raspberry 4 with Ubuntu 20.04

To install the latest/current versions of erlang (23.0.2) and elixir (1.10.3), follow the instructions below:

Install asdf ( full instructions https://asdf-vm.com/#/core-manage-asdf-vm):

git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.7.8

Add the following two lines in your ~/.bashrc file:

# Add asdf version manager 
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash

Reload/Source your bash file with

source ~/.bashrc

Install the erlang plugin

asdf plugin add erlang

If you get the following warnings:

...
Extracting source code
Building Erlang/OTP 23.0.2 (asdf_23.0.2), please wait...
WARNING: It appears that a required development package 'libssl-dev' is not installed.
WARNING: It appears that a required development package 'automake' is not installed.
WARNING: It appears that a required development package 'autoconf' is not installed.
WARNING: It appears that a required development package 'libncurses5-dev' is not installed.
Configure failed.
...

Install the missing packages:

sudo apt install libssl-dev automake autoconf libncurses5-dev

Install latest erlang version:

asdf install erlang latest
...
Erlang/OTP 23.0.2 (asdf_23.0.2) has been successfully built
...

Set it up globally (if you want):

asdf global erlang 23.0.2

Add elixir plugin:

asdf plugin add elixir

Install latest elixir version (1.10.3):

asdf install elixir latest

Set it up globally:

asdf global elixir 1.10.3-otp-23

Finally you can also install the latest Phoenix version (1.5.3):

mix archive.install hex phx_new 1.5.3