Apt-Get Error: Sub-Process /Usr/Bin/Dpkg Returned an Error Code (1)

E: Sub-process /usr/bin/dpkg returned an error code (1) ( might be different than other errors like this )

Finally i found a solution for my problem.
run following commands in your terminal one after other

Here i have problem with mysql package. so i remove all mysql files

cd /usr/sbin/
./mysqld
sudo rm mysql*
 sudo apt-get remove --purge mysql-server mysql-client mysql-common -y
 sudo apt-get autoremove -y
 sudo rm -rf /etc/mysql
 sudo find / -iname 'mysql*' -exec rm -rf {} \;
 sudo systemctl stop mysql
 sudo apt purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-*
 sudo rm -rf /etc/mysql /var/lib/mysql /var/log/mysql
 sudo apt autoremove
 sudo apt autoclean
 sudo apt update
 sudo apt upgrade

E: Sub-process /usr/bin/dpkg returned an error code (1) - elasticsearch

Same error with elasticsearch was resolved by install jre.



Related Topics



Leave a reply



Submit