I have the following commands in Circle CI configuration to install chrome driver to run automated test cases.
sudo apt-get update
sudo apt-get install lsb-release libappindicator3-1
curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome.deb
sudo sed -i 's|HERE/chrome"|HERE/chrome" --no-sandbox|g' /opt/google/chrome/google-chrome
rm google-chrome.deb
Now this is throwing an error :
Ign http://deb.debian.org jessie InRelease
Ign http://http.debian.net jessie-backports InRelease
Get:1 http://deb.debian.org jessie-updates InRelease [7340 B]
Get:2 http://security.debian.org jessie/updates InRelease [44.9 kB]
Get:3 http://deb.debian.org jessie Release.gpg [2420 B]
Ign http://http.debian.net jessie-backports Release.gpg
Get:4 http://deb.debian.org jessie Release [148 kB]
Ign http://http.debian.net jessie-backports Release
Get:5 http://security.debian.org jessie/updates/main amd64 Packages [829 kB]
Get:6 http://deb.debian.org jessie/main amd64 Packages [9098 kB]
Err http://http.debian.net jessie-backports/main amd64 Packages
Err http://http.debian.net jessie-backports/main amd64 Packages
Err http://http.debian.net jessie-backports/main amd64 Packages
Err http://http.debian.net jessie-backports/main amd64 Packages
Err http://http.debian.net jessie-backports/main amd64 Packages
404 Not Found
Fetched 10.1 MB in 1s (8456 kB/s)
W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/InRelease Unable to find expected entry 'main/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)
W: Failed to fetch http://http.debian.net/debian/dists/jessie-backports/main/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
Exited with code 100
so thinking that adding the repo archives will fix the issue, I have added something like this
sudo -i
printf "deb http://archive.debian.org/debian/ jessie main\ndeb-src http://archive.debian.org/debian/ jessie main\ndeb http://security.debian.org jessie/updates main\ndeb-src http://security.debian.org jessie/updates main" > /etc/apt/sources.list
exit
sudo apt-get update
sudo apt-get install lsb-release libappindicator3-1
curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome.deb
sudo sed -i 's|HERE/chrome"|HERE/chrome" --no-sandbox|g' /opt/google/chrome/google-chrome
rm google-chrome.deb
exit 0
this is again blocking the progress and is showing a shell prompt there in the Circle CI job progress timeline as shown in the image. How can this be fixed ? My only requirement is to install a chrome driver.
Related
I was trying to wipe python from my laptop and ran the following commands:
sudo rm -rf /usr/bin/python*
sudo rm -rf /usr/lib/python*
sudo rm -rf /usr/local/lib/python*
As a result, I can't open my terminal, and am currently using Visual Studio's built-in terminal. However, these are some things that happen which can give feedback.
Running
sudo apt update
gives the following messages:
Hit:1 http://ca.archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://ca.archive.ubuntu.com/ubuntu jammy-updates InRelease
Get:3 http://ca.archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB]
Hit:4 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:5 https://dl.google.com/linux/chrome/deb stable InRelease
Get:6 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Hit:7 https://ppa.launchpadcontent.net/linuxuprising/java/ubuntu jammy InRelease
Hit:8 https://packagecloud.io/AtomEditor/atom/any any InRelease
Fetched 210 kB in 1s (263 kB/s)
sh: 1: /usr/lib/cnf-update-db: not found
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code
I attempted to re-install python3 but it shows that it is installed:
sudo apt install python3
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3 is already the newest version (3.10.6-1~22.04).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
But running the command
python3
shows that it is not installed:
$ python3
bash: /usr/lib/command-not-found: /usr/bin/python3: bad interpreter: No such file or directory
I think it has something to do with symbolic links but I'm not sure.
I do get the error message below, while trying to build an Image from a dockerfile.
Any suggestions?
Error Message:
The command '/bin/sh -c apt-get update && apt-get upgrade' returned a non-zero code: 1
Dockerfile screenshot
FROM ubuntu
Maintainer ......
RUN apt-get update && apt-get upgrade
CMD ["echo", "Hello World! from my first docker inage"]
After running the build command screenshot
Sending build context to Docker daemon 3.072kB
Step 1/4: FROM ubuntu
2dc39ba059dc
step 2/4: Maintainer ......
Using cache
-cdea9811b463
Step 3/4 RUN apt-get update 8& apt-get upgrade
Running in 34e13241a292
Get:1 http://archive. ubuntu.con/ubuntu janmy InRe lease [270 kBJ
Get:2 http://security. ubuntu.com/ubuntu jammy- security InRelease [110 kB]
Get:3 http://archive.ubuntu.com/ubuntu janmy-updates InRelease [114 kB]
Get:4 http://archive.ubuntu.coM/ubuntu jammy-backportS INRelease [99.8 kB]
Get:5 http://archive.ubuntu. com/ubuntu jamny/universe and 64 Packages [17.5 MB]
Get:6 http://security.ubuntu.com/ubuntu jamny- security/restrieted amd64 Packages |353 KB]
Get:7 http://security. ubuntu .com/ubuntu jamny-security/universe amd64 Packages [148 kB]
Get:8 http://security.ubuntu .com/ubuntu jamny-security/main amd 64 Packages |372 kB]
Get:9 http://security.ubuntu.com/ubuntu jamny-security/multiverse amd64 Packages [4644 B]
Get:10 http://archive. ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB]
Get:11 http://archive. ubuntu .com/ubuntu Jamny/maln amd64 PackageS |1792 KBJ
Get:12 http:://archive.ubuntu .com/ubuntu jamny/multiverse amdő4 Packages [266 kB]
Get:13 http://archive. ubuntu.com/ubuntu jamny- updates /multiverse and64 Packages [7791 B]
Get:14 http://archive. ubuntu.com/ubuntu jammy-updates/main amd 64 Packages [694 kB]
Get: 15 http://archive. ubuntu.com/ubuntu jamny- updates/restricted and 64 Packages [394 kB]
Get:16 http://archive.ubuntu. com/ubuntu jamny-updates/untverse and64 Packages 325 KB]
Get:17 http://archive. ubuntu.com/ubuntu jamny-backports/main amdó4 Packages [3175 B]I
Get:18 http://archive. ubuntu.com/ubuntu jammy- backports/universe amd64 Packages [7285 B]
Fetched 22.6 MB in 7s (3094 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree.
Reading state information...
Galculating upgrade..
The following packages will be upgraded :
zlib1g
1 upgraded, 0 newly installed, 6 to remove and o not upgraded.
Need to get 58.4 KB of archives.
After this operation, 0 B off additional disk space will be used.
Do you want to continue? [Y/n] Abort.
The comnand /bin/sh -C apt-get update && apt-get upgrade' returned a non -zero code: 1
From the screenshot it looks like that apt-get upgrade was aborted. To automatically confirm apt-get's Y/n prompts, you can specify -y flag.
So change RUN line in your Dockerfile to apt-get update && apt-get -y upgrade
-y, --yes, --assume-yes
Automatic yes to prompts; assume "yes" as answer to all prompts and
run non-interactively. If an undesirable situation, such as
changing a held package, trying to install a unauthenticated
package or removing an essential package occurs then apt-get will
abort. Configuration Item: APT::Get::Assume-Yes.
Trying to use https://github.com/nodesource/distributions/blob/master/README.md to install nodejs in version higher than 10 ( and then npm) on Linux Mint 19.3. It stubbornly installs the 8.10 version.
Tried fixing it with tip from https://unix.stackexchange.com/questions/538536/newest-version-of-nodejs-is-not-intalling-in-linux-mint-tina but 1) "check_alt "Linux Mint" "tricia" "Ubuntu" "bionic" is already in the script 2) the result is the same.
Attempted to use sudo apt-get install as well as wget, which failed just like my last attempt, using the installation script downloaded:
dag#Arokh:~/Desktop/tmp$ sudo apt-get remove nodejs
[sudo] password for dag:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libc-ares2 libhttp-parser2.7.1 libuv1 nodejs-doc
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
nodejs
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 18,0 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 331148 files and directories currently installed.)
Removing nodejs (8.10.0~dfsg-2ubuntu0.4) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
dag#Arokh:~/Desktop/tmp$ sudo ./setup_10.x
## Installing the NodeSource Node.js 10.x repo...
## Populating apt-get cache...
+ apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88,7 kB]
Ign:4 http://packages.linuxmint.com tricia InRelease
Hit:5 https://deb.nodesource.com/node_10.x bionic InRelease
Hit:6 http://archive.canonical.com/ubuntu bionic InRelease
Get:7 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74,6 kB]
Hit:8 http://packages.linuxmint.com tricia Release
Fetched 252 kB in 2s (137 kB/s)
Reading package lists... Done
## You seem to be using Linux Mint version tricia.
## This maps to Ubuntu "bionic"... Adjusting for you...
## Confirming "bionic" is supported...
+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_10.x/dists/bionic/Release'
## Adding the NodeSource signing key to your keyring...
+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
OK
## Creating apt sources list file for the NodeSource Node.js 10.x repo...
+ echo 'deb https://deb.nodesource.com/node_10.x bionic main' > /etc/apt/sources.list.d/nodesource.list
+ echo 'deb-src https://deb.nodesource.com/node_10.x bionic main' >> /etc/apt/sources.list.d/nodesource.list
## Running `apt-get update` for you...
+ apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]
Hit:3 http://archive.canonical.com/ubuntu bionic InRelease
Hit:4 https://deb.nodesource.com/node_10.x bionic InRelease
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88,7 kB]
Ign:6 http://packages.linuxmint.com tricia InRelease
Get:7 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74,6 kB]
Hit:8 http://packages.linuxmint.com tricia Release
Fetched 252 kB in 2s (140 kB/s)
Reading package lists... Done
## Run `sudo apt-get install -y nodejs` to install Node.js 10.x and npm
## You may also need development tools to build native addons:
sudo apt-get install gcc g++ make
## To install the Yarn package manager, run:
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
dag#Arokh:~/Desktop/tmp$ sudo apt-get update
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]
Hit:2 http://archive.canonical.com/ubuntu bionic InRelease
Hit:3 https://deb.nodesource.com/node_10.x bionic InRelease
Hit:4 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88,7 kB]
Ign:6 http://packages.linuxmint.com tricia InRelease
Hit:7 http://packages.linuxmint.com tricia Release
Get:8 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74,6 kB]
Fetched 252 kB in 2s (139 kB/s)
Reading package lists... Done
dag#Arokh:~/Desktop/tmp$ sudo apt-get install -y nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
nodejs
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/4 845 kB of archives.
After this operation, 18,0 MB of additional disk space will be used.
Selecting previously unselected package nodejs.
(Reading database ... 331139 files and directories currently installed.)
Preparing to unpack .../nodejs_8.10.0~dfsg-2ubuntu0.4_i386.deb ...
Unpacking nodejs (8.10.0~dfsg-2ubuntu0.4) ...
Setting up nodejs (8.10.0~dfsg-2ubuntu0.4) ...
update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto mode
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
dag#Arokh:~/Desktop/tmp$ node -v
v8.10.0
For Node version 10
$ sudo apt-get install curl python-software-properties software-properties-common
$ curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -
$ sudo apt-get install nodejs
But try to install the latest one as I can see the post is on Mar2021 and the Node version is 10, you may get a message like
DEPRECATION WARNING
Node.js 10.x is no longer actively supported!
You will not receive security or critical stability updates for this version.
You should migrate to a supported version of Node.js as soon as possible.
Use the installation script that corresponds to the version of Node.js you
wish to install. e.g.
https://deb.nodesource.com/setup_12.x — Node.js 12 LTS "Erbium"
https://deb.nodesource.com/setup_14.x — Node.js 14 LTS "Fermium" (recommended)
https://deb.nodesource.com/setup_15.x — Node.js 15 "Fifteen"
https://deb.nodesource.com/setup_16.x — Node.js 16 "Gallium"
Please see https://github.com/nodejs/Release for details about which
version may be appropriate for you.
The NodeSource Node.js distributions repository contains
information both about supported versions of Node.js and supported Linux
distributions. To learn more about usage, see the repository:
https://github.com/nodesource/distributions
For Latest Release
$ sudo apt-get install curl python-software-properties software-properties-common
$ curl -sL https://deb.nodesource.com/setup_15.x | sudo bash -
For LTS Release
$ sudo apt-get install curl python-software-properties software-properties-common
$ curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
$ sudo apt-get install nodejs
$ node -v
I followed the steps described in the below link to upgrade, hope it helps:
https://phoenixnap.com/kb/update-node-js-version
I chose the first option to Update Node.js with NVM (Node Version Manager)
My dockerfile
FROM node:argon
# Set the locale
RUN apt-get clean && apt-get update
RUN apt-get install locales
RUN locale-gen en_US.UTF-8
9 out of 10 times, it can not be built with the error below.
Sending build context to Docker daemon 73.95 MB
Step 1 : FROM node:argon
---> 10a26800d95a
Step 2 : RUN apt-get clean && apt-get update
---> Running in 5a41dd8ab15e
Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
Get:2 http://security.debian.org jessie/updates/main amd64 Packages [390 kB]
Ign http://httpredir.debian.org jessie InRelease
Err http://httpredir.debian.org jessie Release.gpg
Error reading from server. Remote end closed connection [IP: 5.153.231.35 80]
Get:3 http://httpredir.debian.org jessie-updates InRelease [142 kB]
Err http://httpredir.debian.org jessie-updates/main amd64 Packages
Get:4 http://httpredir.debian.org jessie Release [148 kB]
Err http://httpredir.debian.org jessie-updates/main amd64 Packages
Get:5 http://httpredir.debian.org jessie/main amd64 Packages [9064 kB]
Err http://httpredir.debian.org jessie-updates/main amd64 Packages
Err http://httpredir.debian.org jessie-updates/main amd64 Packages
404 Not Found [IP: 5.153.231.35 80]
Fetched 9808 kB in 15s (615 kB/s)
W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie/Release.gpg Error reading from server. Remote end closed connection [IP: 5.153.231.35 80]
W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages 404 Not Found [IP: 5.153.231.35 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
The command '/bin/sh -c apt-get clean && apt-get update' returned a non-zero code: 100
Nothing changes, any idea?
I built your Dockerfile multiple times without issue. Try restarting your Docker service / instance / machine.
You may be having network issues, as the problem is intermittent.
Your Dockerfile works perfect from my machine. I guess it is caused by the network connectivity. So please check if you are behind a firewall, and whether you need to set a proxy in order to access the Internet. If so, please add this command into your Dockerfile in front of RUN apt-get commands to set proxy ENV http_proxy 'http://<server-address>:<port>'
This happend to me just due to the simple reason that my system clock was in past (not synced). fixing the time made this error disappear.
I am a newbie on unix systems and I've currently a problem with libs updates.
I don't know really how to update the library Boost to the version 1.55
I tried this way but the boost system version returns 1.48.
$ wget
http://downloads.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.gz
$ gunzip boost_1_55_0.tar.gz
$ tar xvf boost_1_55_0.tar
I also tried apt-get update && apt-get upgrade
Then i got some errors:
Get:1 http://http.debian.net wheezy-backports Release.gpg [1,554 B]
Hit http://ftp.debian.org wheezy/main i386 Packages Hit
http://ftp.debian.org wheezy/main Translation-en Get:2
http://http.debian.net wheezy-backports Release [161 kB] Get:3
http://http.debian.net wheezy-backports/main amd64 Packages [606 kB]
Get:4 http://http.debian.net wheezy-backports/main i386 Packages [607
kB] Err http://ppa.launchpad.net wheezy/main Sources 404 Not Found
Err http://ppa.launchpad.net wheezy/main amd64 Packages 404 Not
Found Get:5 http://http.debian.net wheezy-backports/main
Translation-en [376 kB] Err http://ppa.launchpad.net wheezy/main i386
Packages 404 Not Found Ign http://ppa.launchpad.net wheezy/main
Translation-en_GB Ign http://ppa.launchpad.net wheezy/main
Translation-en Fetched 1,752 kB in 1s (896 kB/s) W: Failed to fetch
http://ppa.launchpad.net/boost-latest/ppa/ubuntu/dists/wheezy/main/source/Sources
404 Not Found
W: Failed to fetch
http://ppa.launchpad.net/boost-latest/ppa/ubuntu/dists/wheezy/main/binary-amd64/Packages
404 Not Found
W: Failed to fetch
http://ppa.launchpad.net/boost-latest/ppa/ubuntu/dists/wheezy/main/binary-i386/Packages
404 Not Found
E: Some index files failed to download. They have been ignored, or old
ones used instead. root#vps299256:~# apt-get update && apt-get upgrade
E: Type 'https://packages.debian.org/fr/wheezy/libboost-dev' is not
known on line 3 in source list /etc/apt/sources.list E: The list of
sources could not be read.
Debian 7.11 Wheezy - amd64. Building the 55 libboost1.55 packages :
/etc/apt/sources.lists ... added two lines :
deb-src http://ftp.dk.debian.org/debian/ jessie main
deb-src http://ftp.dk.debian.org/debian/ jessie/updates main
The build-deps ( Summary of 'apt-get build-dep', and then some ) :
# apt-get install g++ fakeroot dctrl-tools libbz2-dev libicu-dev mpi-default-dev bison flex docbook-to-man help2man xsltproc doxygen python-all-dev python3 python3-all-dev debhelper dpkg-dev ... And from [wheezy-backports] : dh-python
Building boost-1.55 in /home/[name]/tmp/boost_1.55/ :
$ apt-get -b source boost1.55=1.55.0+dfsg-3 ... and the libboost 1.55 packages for Debian 7 are created.
The packages (112.5MB) are uploaded as libboost1.55_debian-7.11.tar https://drive.google.com/file/d/0B7S255p3kFXNeGFRZFF6S0g5N3M/view?usp=sharing ... Download, untar with tar xvf libboost1.55_debian-7.11.tar , cd libboost1.55_debian-7.11/, and install with # dpkg -i *.deb