I am trying to install MySql on Debian 10 and keep getting an error. What am I doing wrong? - mysql

I keep trying to install either MySql or MariaDb on a fresh installation of Debian 10. Should be a simple process,(sudo apt-get install mariadb-server mariadb-client)
but I keep getting this error:
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 : Depends: mariadb-client-10.4 (>=
1:10.4.7+maria~buster) but it is not going to be installed
mariadb-server : Depends: mariadb-server-10.4 (>=
1:10.4.7+maria~buster) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
This is a fresh install. PHP and Apache2 are installed. I have tried several times using first MySql and then when that didn't work, I tried using MariaDb, but still get the same error. Not sure what else to do. I tried googling and the only thing close suggested ensuring that it wasn't installed and even purging any previous installations. I tried that but still doesn't work.

After working with this about 4 hours, I finally figured it out. When installing Debian, I was presented with some options regarding software to install. One of those options was to install Web server software. So, I chose to do so. That was a mistake. First, you don't get all of the needed php modules by selected that option. Secondly, that selection does install some of what is needed for MySql, but not enough to actually work.
So, in the end, for anyone else who has this issue, this is how I fixed it.
First, run the commands:
sudo service mysql stop
sudo apt-get --purge remove "mysql*"
sudo rm -rf /etc/mysql/
Then, make sure everything is gone by running
sudo updatedb
locate mysql
You will still see a few things, but make sure that you don't see a my.cnf file. That was the culprit in my case. If you do see it, delete it as well.
Now reinstall MySql and you shouldn't have any issues. If you are also installing phpMyAdmin, you will still need to run one more command to get the needed extensions.
sudo apt install php-imagick php-phpseclib php-php-gettext php7.3-common
php7.3-gd php7.3-imap php7.3-json php7.3-curl php7.3-zip php7.3-xml
php7.3-mbstring php7.3-bz2 php7.3-intl php7.3-gmp

Related

List removed package apt-get

I accidentally run sudo apt-get remove --purge openssl on Ubuntu 18 Mate and it started deleting important packages. How can I reinstall all of them?
Note that apt asks you if you really want to do what it is showing you, so you could have prevented this in first place by answering with No.
Rolling back after a package installation/removal is not trivial.
To "unroll", you'll have to manually consider /var/log/apt/history.log and re-install the removed packages. In the Ubuntu Forums, you can find a command that automatically lists all removed packages. But be careful with that and future package installs/removals. Although it might look like a trivial action to install/remove a package, it is not.

Why can't I uninstall mysql-5.5 & install mysql-5.6 on Amazon Linux machine?

I'm on a 64-bit Amazon Linux machine.
I had previously installed mysql-server 5.5. (using sudo yum install)
However, I soon found out that my application requires MySql-serve 5.6.
So I uninstalled mysql-server 5.5. (using sudo yum remove mysql-server) and now I'm following these instruction to install mysql-server 5.6.
But I'm running into a problem.
when I try to do the second install, I get the following 2 errors:
file /usr/lib64/mysql/libmysqlclient.so.18 from install of mysql-community-libs-5.6.14-3.el6.x86_64 conflicts with file from package mysql55-libs-5.5.46-1.10.amzn1.x86_64
file /etc/my.cnf from install of mysql-community-server-5.6.14-3.el6.x86_64 conflicts with file from package mysql-config-5.5.46-1.10.amzn1.x86_64
Why on earth am I getting these two errors? How do I fix them?
I removed mysql-server-5.5, so why is it conflicting with 5.6?
I did ls on /etc/my.cnf and /usr/lib64/mysql/libmysqlclient.so.18 and the files don't even exist!! If the files don't exist how can they be conflicting with other files?? Who can help explain this?
PS, I tried #msknapp's explanation here: Can't install MySQL 5.6 by RPM, however I don't know what to do after step #1 to install the rpm. I think that step is left unstated.
mysql-server (of whatever version) depends on other packages ( in your case mysql-community-libs mysql-community-server)
When it is installed in the first place with the old version this stuff is installed. When you "uninstall" mysql-server these dependencies are NOT removed.
When you try and install the new version these still existing packages will conflict with the new package. It does not matter if the actual files in the package are there, it is the package and it's listing of what to expect that conflicts.
To resolve your problem figure out what the dependencies of mysql-server were and uninstall them before attemping the install.
This answer https://superuser.com/questions/294662/how-to-get-list-of-dependencies-of-non-installed-rpm-package may be of interest for working out what mysql-server depends on

undoing damage from wrong /etc/apt/sources.list

I had the wrong ubuntu version listed in /etc/apt/sources.list some (it listed precise instead of trusty) which I only discovered after a full day of workarounds for packages that wouldn't install automatically. Now everything is back to speed except for a few remaining troublemakers, libglu and libboost
root#brain2:/home/jeremy# apt-get install libglu1-mesa libglu1-mesa-dev
Reading package lists... Done
libglu1-mesa is already the newest version.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
libglu1-mesa-dev : Depends: libgl1-mesa-dev but it is not going to be installed or libgl-dev
I've tried the usual drill of
apt-get -f install
dpkg --configure -a
apt-get clean
apt-get update
apt-get upgrate
but they do not avail me. Any advisory information appreciated.
Its hard to tell if you fixed your /apt/etc/sources.list without knowing what your ubuntu version is and the contents of the file. Here are some commands that may help you troubleshoot, or someone with more experience than me might comment on:
apt-cache policy <package>
rmadison <package>
The apt-cache policy command will essentially tell you, from your /etc/apt/services.list file, what versions of that package apt sees as available to download. Official documentation is available here:
https://debian-handbook.info/browse/stable/sect.apt-cache.html
The rmadison command performs a similar function but with a key difference. Instead of looking at what you have in /etc/apt/services.list, it queries Debian archives to see what versions of the package are available. The Debian man page on rmadison is here:
http://manpages.ubuntu.com/manpages/natty/man1/rmadison.1.html
If the results from apt-cache policy differs from rmadison, it may indicate that you haven't correctly told apt what versions it should be looking for.

reinstalling mysql-client in ubuntu giving an error in openSIPS menuconfig tool

Initially my openSIPS server menuconfig tool worked properly
When I reinstalled mysql-client by ('sudo apt-get remove mysql-client' later install using 'sudo apt-get install mysql-client') the menuconfig tool of openSIPS gives some warning.
You have enabled the 'db_mysql' module, so please install ' development librariePress any key to continue
I tried by installing 'libmysqlclient-dev' but it didn't work..
That warning is thrown regardless of your OS's libraries, so do not worry about it.
Indeed, it should be "please make sure XXX is installed". At least this sounds less severe. - I will patch it on the master branch.

Installing MYSQL and passenger gems, getting no definitions for documentation

I'm running Mac OSX 10.6.4 and setting up rails for the first time. I've been following a bunch of guides to get set up, specifically these two here and here. Also, I know this question has been asked before, but nothing has helped me and my circumstances are a bit different.
First, let me give you my setup.
I've installed Xcode, but I don't want to use the system ruby so, what I did was, I installed RVM and created two gemsets for different ruby versions (1.8.7#rails2.3.8 and 1.9.2#rails3), cause I also want to try rails 3.
I created a global gemset so that I could install passenger and mysql for 1.8.7 and not have to do it for each project. Then set the global gemset by rvm gemset use global
I had already installed MacPorts in a previous step, so what I've done is install mysql using this command sudo port install mysql5 mysql5-server.
Now I run gem install passenger and then passenger-install-apache2-module. This is where I ran into the first issue. Passenger installed fine, but I got "no definition" errors when it tried to install the documentation.
Finally, I want to install the mysql gem so I followed the steps here by adding rvm_archflags="-arch x86_64" to the ~/.rvmc file and then ran export ARCHFLAGS="-arch x86_64" ; gem install mysql -- --with-mysql-config=/opt/local/lib/mysql5/bin/mysql_config Here is where I ran into the issue again. I got a "Successfully installed mysql-2.8.1" message, but all the documentation returned "no definition" errors!
So, why am I getting these errors when installing gems? What can I do to get them installed without errors and ensure future gem installations don't have this problem?
Note: I'm not using sudo because RVM tells you not to.
Here is a link to your problem. They are saying the same thing and the answer is that it's just noise. Obviously something is not right but there is not and should not be a problem. It's most likely that all is fine and documentation was not created, installed, or linked correctly.
http://www.sitepoint.com/forums/showthread.php?t=629077
A -- alone (as written in step 5) usually means to stop reading options. I expect that this is wrong and doesn't belong here or is incomplete (ie, should be --something).