Question

Root Apt Upgrade “Permission denied” on Digital Ocean

root@shwesingroup20180830-s-1vcpu-2gb-sgp1-01:~# whoami
root
root@shwesingroup20180830-s-1vcpu-2gb-sgp1-01:~#

But when I run, sudo apt install

dpkg: error processing package mysql-server-5.7 (--remove):
 cannot remove '/usr/bin/mysqld_safe': Permission denied
Removing mysql-client-5.7 (5.7.33-0ubuntu0.16.04.1) ...
dpkg: error processing package mysql-client-5.7 (--remove):
 cannot remove '/usr/bin/mysqlrepair': Permission denied
Removing mysql-client-core-5.7 (5.7.33-0ubuntu0.16.04.1) ...
dpkg: error processing package mysql-client-core-5.7 (--remove):
 cannot remove '/usr/bin/mysql': Permission denied
Removing mysql-server-core-5.7 (5.7.33-0ubuntu0.16.04.1) ...
dpkg: error processing package mysql-server-core-5.7 (--remove):
 cannot remove '/usr/bin/innochecksum': Permission denied
No apport report written because MaxReports is reached already

This happened after resetting root password on digital ocean dashboard.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @mse6e1d351ffb98bc38673af9e,

Does this error appear when your run

apt upgrade

or

apt install

It makes a difference to know.

If you are running apt install, what are you trying to install exactly?

When you run apt upgrade are those the only lines of failing, I would assume it’s related to some dependencies.

Regards, KFSys