Skip to content
Prev 3296 / 3656 Next

Solution to apt-key depreciation

Michael,

Sounds great!

If it's any help, I put my solution in a bash script:

#!/bin/bash
KEY=/usr/local/share/keyrings/marutter.key

if [ -f "$KEY" ]; then
  echo "$KEY already exists"
  sudo apt install -y r-base
else
  wget -q -O marutter.key "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xe298a3a825c0d65dfd57cbb651716619e084dab9"
  if ! file marutter.key | grep -q "PGP public key"; then
    echo "marutter.key does not appear to be a valid PGP key - aborting!"
    exit 1
  else
    sudo mkdir -p /usr/local/share/keyrings/
    sudo mv marutter.key /usr/local/share/keyrings/
    echo "deb [signed-by=/usr/local/share/keyrings/marutter.key] https://cloud.r-project.org/bin/linux/ubuntu groovy-cran40/" | sudo tee -a /etc/apt/sources.list
 fi
 sudo apt install -y r-base
fi

Nothing fancy by any means, but it works and could perhaps be useful.

Cheers,
Carl

Sent with ProtonMail Secure Email.

??????? Original Message ???????
On Wednesday, March 17th, 2021 at 16:04, Michael Rutter <marutter at gmail.com> wrote:

            
Message-ID: <yczsD2cuxqiQXQoVOIZKmTpu8_fZWxdBbEQ2W8w5szyMZ8lx1JMimcVPm4Q-emcvL_T6qVsFKvRtY8c9B7l-cQUr9y232JMPVO42nTzkM0A=@pm.me>
In-Reply-To: <796fc705-2174-39e2-a42e-ee9d205056b2@gmail.com>