The error “apt-get: command not found” is an error that is invoked whenever you are coding in react.js. Given below is the snippet of the error:
/bin/sh: apt-get: command not found
I would like to share with you the steps I took to fix the “apt-get: command not found” in your project file.
Why “apt-get command not found” Error is Seen?
The error, “apt-get: command not found” is seen because ever since Oracle bought out MySQL in 2010, they have been converting all the features of the MySQL over to their proprietary Operating System. In the past few months, they switched their default mysql package to Oracle Operating System from Debian.
The detailed solution to fix the error “apt-get: command not found”, is given below:
How to fix “apt-get command not found” Error?
To fix the error “apt-get command not found”, you will have to specify the debian package you will be using in your project and error would be solved.
You have to follow the below mentioned steps to fix the error “apt-get: command not found”.
Ever since Oracle bought out MySQL in 2010, they have been converting all the features of the MySQL over to their proprietary Operating System. In the past few months, they switched their default mysql package to Oracle Operating System from Debian.
You can read more about the Debian packages here.
You have to specify the Debian package you would like to be using:
FROM mysql:5.7-debian
RUN apt-get -y update && apt-get upgrade -y
This should fix the error, “apt-get: command not found” immediately.
Conclusion
To fix the error “apt-get: command not found”, you will have to specify the debian package you will be using in your project. This is because Oracle switched their default mysql package to Oracle Operating System from Debian.