My intent is to install OpenJDK 8, using the docs provided by Microsoft, for the Synapse Spark extension.
The Adoptium installation procedure fails in my fresh WSL Ubuntu distro.
apt install -y wget apt-transport-https
wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/adoptium.gpg > /dev/null
echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^jammy/{print$2}' /etc/os-release) main" | sudo tee /etc/apt/sources.list.d/adoptium.list
results in the following content of the target file:
deb https://packages.adoptium.net/artifactory/deb main
so trying sudo apt update yields
E: Malformed entry 1 in list file /etc/apt/sources.list.d/adoptium.list (Component)
E: The list of sources could not be read.
So the echo command fails in inserting the string argument into the repo URL. When trying to reach the /artifactory repo in the browser for debugging, I get redirected to the UI web site. Is there any simple fix for this issue?