can't install mysql on ubuntu 20.4 - mysql

I am unable to install mysql server on my linux-20.4 machine.I get the following error:
The following packages have unmet dependencies:
mysql-server : Depends: mysql-community-server (= 8.0.27-1ubuntu20.04) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I have tried deleting and then reinstall several times but got the same result.Then i tried to manually install all the packages. But I got stuck in libaio1 and libmecab2. I did apt-get upgrade but still
get the error : Package 'libaio1' has no installation candidate.
This is the first time I am installing mysql.Also I am new to linux.May be I didn't delete existing mysql completely.Please help me install mysql.

Try to install mysql-common and mysql-community-client-plugins both on a single command. It will fix the issue.
sudo apt install mysql-community-client-plugins mysql-common

Related

Cannot install mysql server on Debian 11

I have installed MySQL APT Repository on my OS, then tried to execute the following command:
sudo apt update
sudo apt install mysql-server
It shows me these errors:
$ sudo apt install mysqL-server
Reading package lists.. Done
Building dependency tree.. Done
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:
mariadb-client-core-10.5 : Conflicts: virtual-mysql-client-core
mariadb-server-core-10.5 : Conflicts: virtual-mysql-server-core
E: Error, pkgProblemResolver: :Resolve generated breaks, this may be caused by held
packages
I have never installed mariadb on my device. Why is this error reported? I need to install mysql server on my device.
Please help me.
remove mariadb with
apt remove mariadb-common
then install mysql did it for me

Install Apache on Debian VPS & unmet dependencies error

I have a VPS and it runs on Debian GNU/Linux 8 (jessie). I try to install Apache, PHP, and MySQL on it. I get the below error:
The following packages have unmet dependencies:
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).
When I run apt-get -f install, i get below error:
Preconfiguring packages ...
(Reading database ... 39521 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.5_5.5.52-0+deb8u1_amd64.deb ...
Aborting downgrade from (at least) 10.0 to 5.5.
If are sure you want to downgrade to 5.5, remove the file
/var/lib/mysql/debian-*.flag and try installing again.
dpkg: error processing archive /var/cache/apt/archives/mysql-server-5.5_5.5.52-0+deb8u1_amd64.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (1)
I have basic knowledge of Linux, so any suggestion or help. I search online and try to uninstall and remove and reinstall MySQL... but no luck.
from you error output i did a quick apt-cache search to see the version numbers of mysql-server
from what i seen you might have installed mariadb-server-10.0 installed instead of mysql-server
do a dpkg -l | grep mysql and look at the results. you could also try dpkg -l | grep server and look at that output also.
ADDED COMMENT-
did you remove the file that it's asking you to do?
if you need to have both db-servers running i would follow along with this
https://superuser.com/questions/1029228/mysql-and-mariadb-instances-on-the-same-server
if you don't need both dbs, then i would apt-get remove mariadb-.. from your server and then apt-get -f install to get mysql-server installed

mysql2 gem install fails with unmet dependencies: libmysqlclient-dev

I am experiencing a similar issue to this poster on the askubuntu forums. I've started with a clean Ubuntu 14.04 install several times now and keep getting the same error no matter what I do.
The following packages have unmet dependencies:
libmysqlclient-dev : Depends: libmysqlclient18 (= 5.5.46-0ubuntu0.14.04.2) but 10.0.23+maria-1~trusty is to be installed
E: Unable to correct problems, you have held broken packages.
Reproducing the error:
Followed the instructions on the MariaDB site for version 10.0. I tried 10.1 as well in a previous attempt.
I have Ruby (2.2.3) on Rails (4.2.5) installed on my server. Setup my app, configure the Gemfile and bundle install
An error occurred while installing mysql2 (0.4.2), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.4.2'` succeeds before bundling.
Then I gem install mysql2 -v '0.4.2' and get the following:
mysql client is missing. You may need to 'apt-get install libmysqlclient-dev' or 'yum install mysql-devel', and try again.
So I apt-get install libmysqlclient-dev and get the error Unable to correct problems, you have held broken packages as seen in the first part of this post.
Infos:
apt-cache policy libmysqlclient18 &
libmysqlclient18:
Installed: 10.0.23+maria-1~trusty
Candidate: 10.0.23+maria-1~trusty
Version table:
*** 10.0.23+maria-1~trusty 0
500 http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu/ trusty/main amd64 Packages
100 /var/lib/dpkg/status
5.5.46-0ubuntu0.14.04.2 0
500 http://mirrors.digitalocean.com/ubuntu/ trusty-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
5.5.35+dfsg-1ubuntu1 0
500 http://mirrors.digitalocean.com/ubuntu/ trusty/main amd64 Packages
What step am I missing that will get the bundle install to not encounter issues with the mysql2 gem (and still use MariaDB)? mysql -uroot -p works okay from the terminal.
purge all mysql related packages
sudo apt-get remove --purge mysql*
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get update
Now, that you have a clean system. Try installing mariadb again
sudo apt-get install mariadb-server libmariadbclient-dev mariadb-client mysql-common libmysqlclient18 libmariadbd-dev
just ensure that package version you are being promted to install are the same as given on this page:
http://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/repo/10.0/ubuntu/pool/main/m/mariadb-10.0/
Otherwise, it will install Mysql packages from Ubuntu's official repo which will cause the conflict.If that happens, you should set maria db repo with higher priority as given on this page:
https://askubuntu.com/questions/293619/assign-higher-priority-to-ppa
Hope it helps

Can't find nor install mysql_config

I get this error from Inspircd
Can't exec "mysql_config": No such file or directory at /home/alpha/inspircd-2.0.19/make/utilities.pm line 392, <FLAGS> line 37.
Make sure you have pkg-config installed
In the case of gnutls configuration errors on debian,
Ubuntu, etc, you should ensure that you have installed
gnutls-bin as well as libgnutls-dev and libgnutls.
I've been looking all over the internet trying to find out how to remove the errors.
I have read multiple threads but no luck. I know I need the libmysqlclient-dev package but I can't for the life of me get it installed.
I run
sudo apt-get install libmysqlclient-dev
Also tried cleaning, "-f" and so on but I still get the error.
The following packages have unmet dependencies:
libmysqlclient-dev : Depends: libmysqlclient18 (= 5.5.40-0ubuntu1) but 5.5.41-0ubuntu0.14.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.
I tried it with aptitude
sudo aptitude install libmysqlclient-dev
then I downgraded libmysqlclient18 one version and now it works as it should.
you tried remove all PPA ( Personal Package Archive )?
before try:
sudo apt-get autoremove && sudo aptitude update && sudo aptitude install libmysqlclient-dev
I see in Bugtrack MYSQL:
https://goo.gl/34NUgo
your ERROR is Bug know Bug #73522 Installation of libmysqlclient-dev fails if libmysqlclient18 is from percona
still unsolved:
status: Unsupported
environment: Ubuntu 14.04 LTS; Kernel 3.13, MySql 5.6
att
Have you tried tu upgrade your libmysqlclient18 packet ? (Perform an apt-get update before, just in case ...)

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