installer icon indicating copy to clipboard operation
installer copied to clipboard

Installer issue on Linux Mint (ubuntu based distro)

Open Codes301 opened this issue 3 years ago • 9 comments

Linux Mint 20.3 Kernel: 5.4.0-120-generic Cinnamon version: 5.2.7

For the installer packages for Linux I am not able to install a Temurin version 8 JDK One step 3 for the "Configure the Eclipse Adoptium apt repository:" I am met with permission denied even using sudo doesn't help for that command

it shows the following: tee: /etc/apt/sources.list.d/adoptium.list: Permission denied deb [signed-by=/usr/share/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb una main

I needed a version 8 for Ren'py

Codes301 avatar Jun 26 '22 23:06 Codes301

Solution 1

Run as root

sudo su
echo "deb [signed-by=/usr/share/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list

Solution 2

The sudo command does not work with pipe. https://linoxide.com/use-sudo-when-using-with-redirect-or-pipe/

echo "deb [signed-by=/usr/share/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | sudo tee /etc/apt/sources.list.d/adoptium.list

luozhenyu avatar Jun 28 '22 06:06 luozhenyu

I get the following after running the steps now: "E: The repository 'https://packages.adoptium.net/artifactory/deb una Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default."

Which then results in not being able to locate the package for temurin-8-jdk

Codes301 avatar Jun 28 '22 14:06 Codes301

You get this error because debian/ubuntu does not have a distribution named una. una is the code name of Linux Mint.

Linux Mint 20.3 is based on Ubuntu focal. The solution is replacing una with focal.

$ cat /etc/apt/sources.list.d/adoptium.list
deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb una main
$ echo 'deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb focal main' > /etc/apt/sources.list.d/adoptium.list
$ sudo apt update
Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease                                     
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease                                               
Hit:3 http://archive.canonical.com/ubuntu focal InRelease                                            
Get:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]                            
Hit:5 https://packages.adoptium.net/artifactory/deb focal InRelease                                
Get:6 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]      
Ign:7 http://packages.linuxmint.com una InRelease       
Hit:8 http://packages.linuxmint.com una Release         
Fetched 222 kB in 4s (60.7 kB/s)
Reading package lists... Done
Building dependency tree       
Reading state information... Done

luozhenyu avatar Jul 05 '22 14:07 luozhenyu

You get this error because debian/ubuntu does not have a distribution named una. una is the code name of Linux Mint.

Linux Mint 20.3 is based on Ubuntu focal. The solution is replacing una with focal.

$ cat /etc/apt/sources.list.d/adoptium.list
deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb una main
$ echo 'deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb focal main' > /etc/apt/sources.list.d/adoptium.list
$ sudo apt update
Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease                                     
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease                                               
Hit:3 http://archive.canonical.com/ubuntu focal InRelease                                            
Get:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]                            
Hit:5 https://packages.adoptium.net/artifactory/deb focal InRelease                                
Get:6 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]      
Ign:7 http://packages.linuxmint.com una InRelease       
Hit:8 http://packages.linuxmint.com una Release         
Fetched 222 kB in 4s (60.7 kB/s)
Reading package lists... Done
Building dependency tree       
Reading state information... Done

it gave me a error the following errorrs: bash: /etc/apt/sources.list.d/adoptium.list: Permission denied $: command not found Hit:1: command not found Hit:2: command not found Hit:3: command not found Hit:4: command not found Hit:5: command not found Hit:6: command not found Hit:7: command not found Hit:8: command not found bash: syntax error near unexpected token `(' Reading: command not found Building: command not found

I don't know much about these commands, I simply copied it via the double square icon and placed them into terminal.

Codes301 avatar Jul 05 '22 17:07 Codes301

The lines starting with a $ are my commands and the rest are outputs.

The complete commands are the following.

# You must have superuser privileges
sudo su

# Ensure the necessary packages are present:
apt install -y wget apt-transport-https

# Download the Eclipse Adoptium GPG key
mkdir -p /etc/apt/keyrings
wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | tee /etc/apt/keyrings/adoptium.asc

# Configure the Eclipse Adoptium apt repository
echo 'deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb focal main' > /etc/apt/sources.list.d/adoptium.list

# Install the Temurin version you require
apt update
apt install temurin-17-jdk

luozhenyu avatar Jul 05 '22 21:07 luozhenyu

The lines starting with a $ are my commands and the rest are outputs.

The complete commands are the following.

# You must have superuser privileges
sudo su

# Ensure the necessary packages are present:
apt install -y wget apt-transport-https

# Download the Eclipse Adoptium GPG key
mkdir -p /etc/apt/keyrings
wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | tee /etc/apt/keyrings/adoptium.asc

# Configure the Eclipse Adoptium apt repository
echo 'deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb focal main' > /etc/apt/sources.list.d/adoptium.list

# Install the Temurin version you require
apt update
apt install temurin-17-jdk

This one worked for me. However, the following command to configure the apt repository, given on official documentation, didn't work for me.

echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list

candeemis avatar Aug 05 '22 15:08 candeemis

Try echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | sudo tee /etc/apt/sources.list.d/adoptium.list

berndschatz avatar Nov 11 '22 08:11 berndschatz

This solution works for me, https://askubuntu.com/questions/1375383/how-to-properly-install-temurin-jdk-with-update-alternatives

should add sudo" to each command in document

dylanw-oss avatar Dec 14 '22 23:12 dylanw-oss

@gdams Are we posting workarounds for other O/S's anywhere in particular or letting SEO solve this for us?

karianna avatar Dec 28 '22 07:12 karianna