Can't remove mysql-server from Ubuntu - mysql

I've gotten into a bad state with MySQL on Ubuntu 16.04, so I attempted to remove it. I thought I successfully removed it with apt-get remove, but now whenever I do an apt-get or something I get the following:
$ sudo apt-get purge mysql-client-core-5.5
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'mysql-client-core-5.5' is not installed, so not removed
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
mysql-server-5.7 : PreDepends: mysql-common (>= 5.5) but it is not going to be installed
Depends: mysql-client-5.7 (>= 5.7.16-0ubuntu0.16.04.1) but it is not going to be installed
Depends: mysql-common (>= 5.6.22-1~) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
This seems to happen for any package I try to remove / install / etc. What's the best way to remove this?

Related

Mysql installation on ubuntu 16.04

I am installing mysql on Ubuntu 16
when I use :
sudo apt-get install mysql-server mysql-client
it gives me :
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-client is already the newest version (5.7.18-1ubuntu16.04).
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
mysql-client : Depends: mysql-community-client (= 5.7.18-1ubuntu16.04) but it is not going to be installed
mysql-server : Depends: mysql-community-server (= 5.7.18-1ubuntu16.04) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
how do I resolve this issue.

Cannot install the software because of version of mysql-server issue

When I install git. It showed the error as following:
$ sudo apt-get install git-all
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
git-all : Depends: git-doc but it is not going to be installed
Depends: git-el but it is not going to be installed
Depends: git-arch but it is not going to be installed
Depends: git-cvs but it is not going to be installed
Depends: git-svn but it is not going to be installed
Depends: git-email but it is not going to be installed
Depends: git-gui but it is not going to be installed
Depends: gitweb but it is not going to be installed
Recommends: git-daemon-run but it is not going to be installed or
git-daemon-sysvinit but it is not going to be installed
mysql-server-5.5 : Breaks: mysql-server (< 5.5.53-0ubuntu0.12.04.1) but 5.5.47-0ubuntu0.12.04.1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Please help me to resolve this. Thanks.

mysql gem for rails not getting installed on ubuntu 14.04

sony#ubuntu:~$ sudo apt-get install libmysql-ruby libmysqlclient-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libmysql-ruby
sony#ubuntu:~$ sudo apt-get install libmysqlclient-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libmysqlclient-dev : Depends: libmysqlclient18 (= 5.5.35+dfsg-1ubuntu1) but 5.5.41-0ubuntu0.14.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.
sudo apt-get install ruby-mysql

Unable to install libjpeg-turbo8-dev on Ubuntu

I tried to install libjpeg-turbo8-dev like this.
feng#HP:~$ sudo apt-get install libjpeg-turbo8-dev
[sudo] password for feng:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
kde-l10n-engb libasn1-8-heimdal:i386 libasound2:i386 libasyncns0:i386
libaudio2:i386 libavahi-client3:i386 libavahi-common-data:i386
{***many packages***}
libxml2:i386 libxmu6:i386 libxrender1:i386 libxt6:i386
libxxf86vm1:i386 mysql-common openjdk-7-jre-lib
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
libjpeg-turbo8-dev
0 upgraded, 1 newly installed, 0 to remove and 39 not upgraded.
1 not fully installed or removed.
Need to get 0 B/420 kB of archives.
After this operation, 1 219 kB of additional disk space will be used.
(Reading database ... 261347 files and directories currently installed.)
Unpacking libjpeg-turbo8-dev:amd64 (from .../libjpeg-turbo8-dev_1.3.0-0ubuntu1.1_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/libjpeg-turbo8-dev_1.3.0-0ubuntu1.1_amd64.deb (--unpack):
trying to overwrite '/usr/include/jmorecfg.h', which is also in package libjpeg-turbo-devel 1.3.0-3
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libjpeg-turbo8-dev_1.3.0-0ubuntu1.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
My Ubuntu is 13.10
I want to install libjpeg-turbo8-dev, because I want to install mysql-server and mysql-client. Thet depends on this package.
feng#HP:~$ sudo apt-get install mysql-server mysql-client
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libjpeg8-dev : Depends: libjpeg-turbo8-dev (>= 1.1.90+svn722-1ubuntu6) but it is not going to be installed
mysql-client : Depends: mysql-client-5.5 but it is not going to be installed
mysql-server : Depends: mysql-server-5.5 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
What you could try is to install the synaptic package manager:
sudo apt-get install synaptic
Here is someone who had a similar problem with the java runtime. Maybe this can help you if synaptic doesn't.
Otherwise I am not sure if you do really need the dev package...

Dependency error while installing mysql workbench on ubuntu 12.04

I am trying to install mysql workbench. I am getting below error. It seems that it looks for mysql in some default directory. I have all the required things installed, but not where mysqlworkbench is expecting it to be. Whats the way out!
local#host:/var/www/$ sudo apt-get -f install mysql-workbench
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
mysql-workbench : Depends: libctemplate0 but it is not going to be installed
Depends: libgtkmm-2.4-1c2a (>= 1:2.24.0) but it is not going to be installed
Depends: libmysqlclient18 (>= 5.5.13-1) but it is not going to be installed
Depends: libtinyxml2.6.2 but it is not going to be installed
Depends: libzip2 (>= 0.10) but it is not going to be installed
Depends: mysql-workbench-data (= 5.2.38+dfsg-3) but it is not going to be installed
Depends: mysql-client
Depends: python-mysql.connector but it is not going to be installed
Depends: python-paramiko but it is not going to be installed
Depends: python-pysqlite2 but it is not going to be installed
Depends: python-all but it is not going to be installed
Recommends: ttf-bitstream-vera but it is not going to be installed
Recommends: mysql-utilities but it is not installable
mysql-workbench-community : Depends: libctemplate2 but it is not installable
Depends: libglib2.0-0 (>= 2.35.9) but 2.32.3-0ubuntu1 is to be installed
Depends: libglibmm-2.4-1c2a (>= 2.33.13) but 2.32.0-0ubuntu1 is to be installed
Depends: libgtkmm-2.4-1c2a (>= 1:2.24.0) but it is not going to be installed
Depends: libmysqlclient18 (>= 5.5.13-1) but it is not going to be installed
Depends: libpcrecpp0 (>= 7.7) but it is not going to be installed
Depends: libtinyxml2.6.2 but it is not going to be installed
Depends: libzip2 (>= 0.10) but it is not going to be installed
Depends: python-paramiko but it is not going to be installed
Depends: mysql-client
Depends: python-pysqlite2 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
You probably ran
dpkg -i mysql-workbench.deb
which doesn't work as dpkg does not resolve dependencies and now the installation of MySQL Workbench is broken. Run this command instead:
sudo apt-get -f install
After that MySQL Workbench should be installed fine.
Also keep in mind that we provide downloads for Ubuntu (select Ubuntu Linux from the drop down).
Try installing again, let it fail and run the second command:
sudo apt-get -f install mysql-workbench
sudo apt --fix-broken install
That did the trick for me on a similar issue for me trying to install mysql 5.7 on ubuntu 18.04. The problem manifested in my machine because I first tried to install mysql with a DEB package and then I tried to install it from mysql's apt repository.
I faced same issue but the below method worked for me. sudo apt-get update then sudo apt-get install mysql-workbench use this link for more details - http://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/#apt-repo-fresh-install
After the installation faild I use
sudo apt --fix-broken install
And all works as expected
If the error is :
The following packages have unmet dependencies:
mysql-workbench : Depends: gdal-abi-2-1-2
Updating the package tree will do nothing.
NOTE: this is a set of ideas to try (so the answer is incomplete but i think it can help some) [I didn't get the time to test all the options] (when i do i will update)
A solution is to download that package and install it from
https://debian.pkgs.org/9/debian-main-amd64/libgdal20_2.1.2+dfsg-5_amd64.deb.html
direct download link
http://ftp.br.debian.org/debian/pool/main/g/gdal/libgdal20_2.1.2+dfsg-5_amd64.deb
sudo apt install ./libgdal20_2.1.2+dfsg-5_amd64.deb # and that being in the download folder
Note that will downgrade libgdal20, at least in my case:
The following packages will be REMOVED:
blender frei0r-plugins libopencv-calib3d3.2 libopencv-contrib3.2 libopencv-features2d3.2 libopencv-highgui3.2 libopencv-imgcodecs3.2
libopencv-objdetect3.2 libopencv-stitching3.2 libopencv-superres3.2 libopencv-videoio3.2 libopencv-videostab3.2 libopencv-viz3.2 libopenimageio1.8
libvtk6.3
The following NEW packages will be installed:
libarmadillo7 libdap23 libnetcdf11 libproj12 libxerces-c3.1
The following packages will be DOWNGRADED:
libgdal20
You can see here how many package are to be removed, blender one of them for me. So check if you want to do that.
After that you should be good to install workbench (haven't tried it, just think it will work, i didn't want to uninstall blender).
Another way, which is not reassuring, is to install the latest version from the official website, getting the for ubuntu package. https://dev.mysql.com/downloads/workbench/.
Installed it working fine up to now. You will get a message alerting about the system, and that errors may occur. You can choose to not see again the message.
And last way, installing from the source code, i don't have time currently, so i will update once it's done. I think this will be the best options, as a good way to learn new things. I will update and write a tutorial once i do it.
for me this command worked
sudo apt-get -f install ./mysql-workbench-community-dbgsym_8.0.28-1ubuntu20.04_amd64.deb
Download mysql-workbench-community_8.0.29-1ubuntu20.04_amd64.deb
from https://downloads.mysql.com/archives/workbench/
... NOT mysql-workbench-community-dbgsym... !!!
choose a version that matches your Linux version
sudo apt-get update
sudo apt --fix-broken install
sudo apt install gnome-keyring libproj-dev libpcrecpp0v5
sudo dpkg -i mysql-workbench-community_8.0.29-1ubuntu20.04_amd64.deb