Unable to locate package google-chrome-stable ubuntu12 on openstack - bash

I'm running a script on my ubuntu on openstack (env bash) which is trying to install the latest stable chrome browser:
sudo apt-get update
sudo apt-get -y install openjdk-7-jre google-chrome-stable
But I'm getting --> Unable to locate package google-chrome-stable ubuntu
I tried the following additions but they didn't help:
# trying universe repo
sudo apt-get -y install libgconf2-4 libnss3-1d libxss1
sudo apt-get update
# trying something for openstack
sudo apt-get install ubuntu-cloud-keyring
sudo apt-get update
Will be happy to hear more suggestions.

Setup key with:
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
Setup repository with:
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install google-chrome-stable
(https://www.ubuntuupdates.org/ppa/google_chrome)

As written in the comment above, The fix is adding:
deb http://dl.google.com/linux/chrome/deb/ stable main to the source file:
sudo sh -c "echo 'deb http://dl.google.com/linux/chrome/deb/ stable main' >> /etc/apt/sources.list"

For information chrome is not available on ARM. That is why nothing worked for me here.

First you need to add key:
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A040830F7FAC5991
and then you could do:
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google.list
apt-get update && apt-get install -y google-chrome-stable
Without key you are installing unsigned package and because of that you might get problems late.

The existing accepted answer is close but fails to use HTTPS:
Setup key with:
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
Setup repository with:
sudo sh -c 'echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install google-chrome-stable
(https://www.ubuntuupdates.org/ppa/google_chrome)

If nothing works, try:
$ touch /etc/apt/sources.list

Related

Install go-swagger on Linux Ubuntu

I want to install go-swagger on LInux Ubuntu 22.04 but i have blocker. This is my code to install go-swagger.
sudo apt update
sudo apt install -y apt-transport-https gnupg curl
curl -1sLf 'https://dl.cloudsmith.io/public/go-swagger/go-swagger/gpg.2F8CB673971B5C9E.key' | sudo apt-key add -
curl -1sLf 'https://dl.cloudsmith.io/public/go-swagger/go-swagger/config.deb.txt?distro=debian&codename=any-version' | sudo tee /etc/apt/sources.list.d/go-swagger-go-swagger.list
sudo apt update
sudo apt install swagger
but the result on my laptop
Unable to locate package swagger,
please help me to the solving my blocker
This is similar to the bug on Caddy due to changes in CloudSmith. Run
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/go-swagger/go-swagger/gpg.2F8CB673971B5C9E.key' | sudo gpg --dearmor -o /usr/share/keyrings/go-swagger-go-swagger-archive-keyring.gpg
to import the key.

Repository 'http://security.debian.org/debian-security buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable'

Some of my GitHub Actions workflows started recently to return this error when installing Chromedriver:
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:2 http://deb.debian.org/debian buster InRelease [122 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
Reading package lists...
E: Repository 'http://security.debian.org/debian-security buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
E: Repository 'http://deb.debian.org/debian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
E: Repository 'http://deb.debian.org/debian buster-updates InRelease' changed its 'Suite' value from 'stable-updates' to 'oldstable-updates'
Error: Process completed with exit code 100.
Here is my step implementation:
jobs:
build:
runs-on: ubuntu-latest
container:
image: docker://guillaumefalourd/ritchiecli:py-3.8
steps:
- name: Install Chrome Driver
run: |
sudo apt-get update
sudo apt-get install -y unzip xvfb libxi6 libgconf-2-4 gnupg2
sudo curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add
sudo echo "deb https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
sudo apt-get -y update
sudo apt-get -y install google-chrome-stable
wget -N https://chromedriver.storage.googleapis.com/89.0.4389.23/chromedriver_linux64.zip -P ~/
unzip ~/chromedriver_linux64.zip -d ~/
rm ~/chromedriver_linux64.zip
sudo mv -f ~/chromedriver /usr/local/bin/chromedriver
sudo chown root:root /usr/local/bin/chromedriver
sudo chmod 0755 /usr/local/bin/chromedriver
Docker Image Implementation: docker://guillaumefalourd/ritchiecli:py-3.8
What I tried
I read from here and here that adding sudo apt-get --allow-releaseinfo-change update or sudo apt-get dist-upgrade could resolve the problem, but even adding those to my workflow didn't resolve it.
I tried using this action setup-chromedriver but it returned the same error when following the documentation:
steps:
- uses: actions/checkout#v2
- uses: nanasess/setup-chromedriver#master
with:
# Optional: do not specify to match Chrome's version
chromedriver-version: '88.0.4324.96'
- run: |
export DISPLAY=:99
chromedriver --url-base=/wd/hub &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
As it seems to be related to Debian 10 (Buster) (?) I also tried to use another Ubuntu runner version as a runner (ubuntu-18.04 instead of ubuntu-latest), but nothing changed, same error.
How can I resolve this issue?
Answer
I observed afterwards that the problem was happening at the first command : sudo apt-get update (and I was adding the other command after...).
Substituting it for sudo apt-get --allow-releaseinfo-change update resolved my problem.
Therefore the answer was not to add the sudo apt-get --allow-releaseinfo-change update to the step executed commands, but substituting the sudo apt-get update command for it.
jobs:
build:
runs-on: ubuntu-latest
container:
image: docker://guillaumefalourd/ritchiecli:py-3.8
steps:
- name: Install Chrome Driver
run: |
sudo apt-get --allow-releaseinfo-change update
sudo apt-get install -y unzip xvfb libxi6 libgconf-2-4 gnupg2
sudo curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add
sudo echo "deb https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
sudo apt-get -y update
sudo apt-get -y install google-chrome-stable
wget -N https://chromedriver.storage.googleapis.com/89.0.4389.23/chromedriver_linux64.zip -P ~/
unzip ~/chromedriver_linux64.zip -d ~/
rm ~/chromedriver_linux64.zip
sudo mv -f ~/chromedriver /usr/local/bin/chromedriver
sudo chown root:root /usr/local/bin/chromedriver
sudo chmod 0755 /usr/local/bin/chromedriver
I know you tried it with
apt-get --allow-releaseinfo-change update
but it worked for me.
This is my command in the dockerfile:
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get --allow-releaseinfo-change update \
&& apt-get install -y google-chrome-unstable \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
not required: rm -rf /var/lib/apt/lists/*
FWIW, you may reduce your risk in using this option (--allow-releaseinfo-change) by adding specialist options to limit the fields you permit to bypass apt-secure. From man apt-get:
Specialist options (--allow-releaseinfo-change-field) exist to allow changes only for certain fields like origin, label, codename, suite, version and defaultpin. See also apt_preferences(5).
For example, in the current bugaboo created by the delayed release of bullseye between the Debian and its derivative RPi OS, the specialist option would be suite. This due to the fact that the suite label in buster has been changed from stable to oldstable:
$ sudo apt-get --allow-releaseinfo-change-suite update

How to install Java 8 or higher on Debian 8 given the jessie-backports are no more valid?

I had tried the following two ways but no luck
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" > /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" >> /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
apt-get update && apt-get install oracle-java8-installer -y
I get error saying
Unable to find the oracle8-java-installer package
I tried openjdk-8-jdk too but no luck
FROM debian:jessie
RUN echo deb-src http://security.debian.org/ jessie/updates main > /etc/apt/sources.list.d/extra_debian.list >> /etc/apt/sources.list.d/extra_debian.list
RUN apt-get update && apt-get install -y openjdk-8-jdk
Step 9/9 : RUN apt-get install -y openjdk-8-jdk
---> Running in eaf2278dd79f
Reading package lists...
Building dependency tree...
Reading state information...
Package openjdk-8-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

small issue with ddev - brew - docker

just set up a dev laptop but installing ddev has been problematic. followed instructions from docs.docker.com, ddev.readthedocs.com, and Mike Anello's book for DDEV LOCAL.
An unusual and undocumented bit of installation is when I tried to run brew initially, my Ubuntu 18.04 complained to me to install linuxbrew-wrapper so I did. Then the brew worked properly.
The situation is this: I cannot run ddev unless the docker container is stopped. Looking in /bin and /Cellar shows most of the executables have myname:docker as owner/group but ddev, hello, patchelf are myname:myname owner/group.
Should I chown those files to myname:docker owner/group to be able to run them while the container is live?
or
Am I supposed to shut off the container for running ddev?
Solution (ymmv)
Part 1
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get install docker-ce docker-ce-cli containerd.io
sudo docker run hello-world
sudo curl -L "https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose
docker-compose --version
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
Part 2
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
sudo apt-get install build-essential
sudo apt-get -o Dpkg::Options::="--force-overwrite" install --fix-broken
echo 'eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >>~/.profile
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
echo 'eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >>~/.bashrc
source .bashrc
Part 3
brew
brew install gcc
brew tap drud/ddev && brew install ddev
mkcert --install

How to install Codeblocks 13.12 on Mint 16

I am trying to install Code::blocks on Mint16, but newest version in public repo is old (12.11-3). Is there any way of having newest version?
based on reading screenshots on https://launchpad.net/~pasgui/+archive/ppa/
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3EE66BD3F599ACE3
grep pasgui /etc/apt/sources.list || echo $'deb http://ppa.launchpad.net/pasgui/ppa/ubuntu saucy main
deb-src http://ppa.launchpad.net/pasgui/ppa/ubuntu saucy main' | sudo tee -a /etc/apt/sources.list
sudo apt-get update --download-only
sudo apt-get install codeblocks

Resources