Unable to locate package curl, git, wget, unazip, etc,

While I try to build docker image using docker file, in the follwing commands in dockerfile error has occured like unable to locate package curl, git, etc ,…

Step 4/18 : RUN apt-get update
81 —> Using cache
82 —> f3aefb29ff78
83Step 5/18 : RUN apt-get install -y curl git wget unzip libgconf-2-4 gdb libstdc++6 libglu1-mesa fonts-droid-fallback lib32stdc++6 python3
84 —> Running in dddddb455c23
85Reading package lists…
86Building dependency tree…
87Reading state information…
88E: Unable to locate package curl
89E: Unable to locate package git
90E: Unable to locate package wget
91E: Unable to locate package unzip
92E: Unable to locate package libgconf-2-4
93E: Unable to locate package gdb
94E: Unable to locate package libglu1-mesa
95E: Unable to locate package fonts-droid-fallback
96E: Unable to locate package lib32stdc++6
97E: Couldn’t find any package by regex ‘lib32stdc++6’
98E: Unable to locate package python3

failed to build: The command ‘/bin/sh -c apt-get install -y curl git wget unzip libgconf-2-4 gdb libstdc++6 libglu1-mesa fonts-droid-fallback lib32stdc++6 python3’ returned a non-zero code: 100

I am assuming you are using a Ubuntu or Debian-like image, this stack overflow Answers might be helpful.

@abubakar Thanks, but I also trieed the stackoverflow solution, but it didn’t resolved in my case.
After executing apt-get update command, then it goes to execute apt-get install packages it shows error like i mentioned in above.

@GOKUL416021

run apt-get update in the same RUN command so old or invalid apt metadata are not cached in layer by Docker.

apt-get update && apt-get install -y ...

yeah, I tried to run in a single line command by running after update like u mentioned, but it showed Temproary failure on resolving archieve.ubuntu.com, followed by error i mentioned in the question.

Since you don’t specify more details this can be caused by any issue in base image you are using or your network setup.

This would be too generic to troubleshoot by just guessing.

Try to run the same commands in a different Dockerfile using FROM ubuntu:latest or similar, try to purge Docker cache, and so on.

According this Ubuntu Forum https://ubuntuforums.org/showthread.php?t=1894149 this was solved by @ arzali

that is the 32bit version of the library, meant for AMD64 systems.
If you have a 32bit system, then you should use libstdc++6.
for compiling you need the dev packages.
My tip:

Code:

$sudo apt-get install build-essential