I am downloading MySQL and I 've been told to download a .deb, so I download a mysql-apt-config_0.8.15-1_all.deb
from the website. The problem is that when I type in sudo dpkg -i mysql-apt-config_0.8.15-1_all.deb
, the terminal says sudo: dpkg: command not found
. I know that this question has been posted before, but I couldn't understand the solution, is there any simple way that I can fix this? Thanks in advance.
Asked
Active
Viewed 9,801 times
3

Peter24
- 71
- 1
- 7
2 Answers
2
On Mac, use brew install dpkg
.
If brew is not installed, try /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Then use brew install dpkg
and then you can simply use dpkg -i
.

Akshat Vats
- 145
- 7
-
I get an error "Unable to locate an executable at "/Library/Java/JavaVirtualMachines/jdk-13.0.1.jdk/Contents/Home/bin/apt" (-1)" people online says that it may be the problem that mac doesn't support APT by default??? What's does that mean? – Peter24 Jun 12 '20 at 11:50
-
@Peter24 OK, I didn't know you were using a Mac. Do you have brew? If not, try ```/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"```. Then ```brew install dpkg```. After that you will be able to use ```dpkg -i```, hopefully. – Akshat Vats Jun 12 '20 at 12:09
-
I've got a brew and brew install dpkg works, however, i gave me this after I execute sudo dpkg -i : dpkg: warning: '/usr/local/opt/gnu-tar/bin/gtar' not found in PATH or not executable dpkg: error: 1 expected program not found in PATH or not executable Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin – Peter24 Jun 12 '20 at 12:46
-
@Peter24 https://dev.mysql.com/doc/refman/5.7/en/osx-installation-pkg.html. It tells to download .pkg for mc – Akshat Vats Jun 12 '20 at 13:03
-
strange thing is that when I installed the package, it told me to set the root password by myself instead of giving me a new one, is that normal? – Peter24 Jun 12 '20 at 13:48
-
@Peter24 I am reasonably certain it is normal, as MacOS doesn't enable root account from the beginning. https://support.apple.com/en-us/HT204012 – Akshat Vats Jun 12 '20 at 14:16
-
@Peter24 Don't forget to accept the answer if it worked. – Akshat Vats Jun 12 '20 at 14:17
-
I stuck at the point after I enter sudo mysql -u root -p, it still gives me the error 'Access denied for user 'root'@'localhost' (using password: YES)' , I don't know how to solve it.. – Peter24 Jun 12 '20 at 15:26
-
@Peter24 See the above link to Apple support, and instead of using sudo, try logging in to root account. – Akshat Vats Jun 12 '20 at 15:30
-
@Peter If your problem is solved then please accept my answer or post your own and accept it, so that this question doesn't remain unanswered. Have a nice day! – Akshat Vats Jun 13 '20 at 09:46
-
sorry, but it is still not working, I tried logging in but of no use – Peter24 Jun 13 '20 at 14:00
-
@Peter24 https://stackoverflow.com/q/41645309/13725918. Try this. Good luck! – Akshat Vats Jun 13 '20 at 14:18
1
Yes, most probably you are on the wrong shell. Type bash or sh before running the dpkg command. I hope this works! If it doesn't comment below! If it works please accept!
Note: dpkg -i not dpkg-i

DAVID
- 92
- 1
- 8
-
Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackoverflow.com/rooms/215867/discussion-on-answer-by-david-zsh-command-not-found-dpkg). – Samuel Liew Jun 13 '20 at 08:16