MySQL won't install on Linux [closed] - mysql

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I'm trying to install MySQL for my Ubuntu VM 14.04 X86 64
I'm getting some error messages:
150424 11:40:15 [Warning] Using unique option prefix key_buffer
instead of key_buffer_size is deprecated and will be removed in a
future release. Please use the full name instead. 150424 11:40:15
[Note] /usr/sbin/mysqld (mysqld 5.5.43-0ubuntu0.14.04.1) starting as
process 4724 ... start: Job failed to start invoke-rc.d: initscript
mysql, action "start" failed. dpkg: error processing package
mysql-server-5.5 (--configure): subprocess installed post-installation
script returned error exit status 1 dpkg: dependency problems prevent
configuration of mysql-server: mysql-server depends on
mysql-server-5.5; however: Package mysql-server-5.5 is not configured
yet. dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured Setting up mysql-client
(5.5.43-0ubuntu0.14.04.1) ... Errors were encountered while
processing: mysql-server-5.5 mysql-server E: Sub-process /usr/bin/dpkg
returned an error code (1) W: Operation was interrupted before it
could finish
I have tried reinstalling and cleaning it up after and stuff...
It still gives the same error.
Anyone that have a clue?

Related

Failed to install ROCm on Ubuntu 20.04 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I would like to set up AMD Radeon for Deep Learning on Ubuntu. The main libraries for my work are keras and pytorch. I followed strictly on ROCm installation guideline here but failed at the 3rd step with the command sudo apt install rocm-dkms. Error messages were shown as follows.
Setting up dkms (2.8.1-5ubuntu1) ...
Setting up hip-rocclr (4.0.20496.5685.40000-23) ...
Setting up rock-dkms (1:4.0-23) ...
Loading new amdgpu-4.0-23 DKMS files...
Building for 5.8.0-41-generic
Building for architecture x86_64
Building initial module for 5.8.0-41-generic
Error! Bad return status for module build on kernel: 5.8.0-41-generic (x86_64)
Consult /var/lib/dkms/amdgpu/4.0-23/build/make.log for more information.
dpkg: error processing package rock-dkms (--configure):
installed rock-dkms package post-installation script subprocess returned error
exit status 10
Setting up g++-9 (9.3.0-17ubuntu1~20.04) ...
Setting up g++ (4:9.3.0-1ubuntu2) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mo
de
Setting up build-essential (12.8ubuntu1.1) ...
dpkg: dependency problems prevent configuration of rocm-dkms:
rocm-dkms depends on rock-dkms; however:
Package rock-dkms is not configured yet.
dpkg: error processing package rocm-dkms (--configure):
dependency problems - leaving unconfigured
Setting up gcc-multilib (4:9.3.0-1ubuntu2) ...
No apport report written because the error message indicates its a followup erro
r from a previous failure.
Setting up g++-9-multilib (9.3.0-17ubuntu1~20.04) ...
Setting up g++-multilib (4:9.3.0-1ubuntu2) ...
Processing triggers for sgml-base (1.29.1) ...
Setting up x11proto-dev (2019.2-1ubuntu1) ...
Setting up libxau-dev:amd64 (1:1.0.9-0ubuntu1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for man-db (2.9.1-1) ...
Setting up libxdmcp-dev:amd64 (1:1.1.3-0ubuntu1) ...
Setting up x11proto-core-dev (2019.2-1ubuntu1) ...
Setting up libxcb1-dev:amd64 (1.14-2) ...
Setting up libx11-dev:amd64 (2:1.6.9-2ubuntu1.1) ...
Setting up libglx-dev:amd64 (1.3.2-1~ubuntu0.20.04.1) ...
Setting up libgl-dev:amd64 (1.3.2-1~ubuntu0.20.04.1) ...
Setting up mesa-common-dev:amd64 (20.2.6-0ubuntu0.20.04.1) ...
Setting up rocm-opencl-dev (3.6Beta-17-g875c1f8-rocm-rel-4.0-23) ...
Settin XT g up rocm-clang-ocl (0.5.0.64-rocm-rel-4.0-23-50fb51a) ...
Setting up rocm-utils (4.0.0.40000-23) ...
Setting up rocm-dev (4.0.0.40000-23) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Errors were encountered while processing:
rock-dkms
rocm-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
My kernel version is 5.8.0-41-generic. My VGA card is Gigabyte Radeon RX6900 XT. My CPU is AMD Ryzen 9 3900 XT. I tried several solutions suggested in previous posts but it did not solve my problem. May I have your suggestions to fix this.
I've been having the same issue as well. The only way I found to fix it is to roll back to the 5.6.0-1042-oem kernel. The AMD drivers don't seem to support any kernel past this one.
Edit: This is also a way to get the amdgpupro drivers to install without a problem.
WARNING: I'm writing all this after the fact and i might have missed a step or something along the way. Please be very careful especially with trying to remove kernels and when working in your boot directory. If you're uncomfortable with the idea of wrecking your system you can always set grub's default selection which is a lot safer than removing an initramfs.
Here's how I got RocM working
sudo apt install linux-image-5.6.0-1042-oem linux-headers-5.6.0-1042-oem && reboot
Make sure you boot into the 5.6 kernel by accessing the Ubuntu advanced options in grub.
sudo apt remove linux-image-5.8.0-41-generic linux-headers-5.8.0-41-generic && sudo apt autoremove && reboot
Again you'll have to reboot into 5.6 through the advanced options. (Hold the shift key after BIOS finishes loading to get the Ubuntu Advanced Options menu.) After you're back in it's a good idea to set your headers and image as held back because a kernel update will most likely break RocM.
sudo apt-mark hold linux-image-generic linux-headers-generic
Now we're going to try and flush out the 5.8 kernel. Start by flushing out the temporary files.
sudo rm -rv ${TMPDIR:-/var/tmp}/mkinitramfs-*
Now list all of the kernels installed.
dpkg -l | tail -n +6 | grep -E 'linux-image-[0-9]+'
And try to remove the 5.8 kernel. Do this for any kernel you have above the 5.6 one we installed.
sudo update-initramfs -d -k 5.8.0-41-generic
Now the initramfs, Systemmap, and config are still present in the boot dir so we need to clear those out to get grub working properly again.
cd /boot/
sudo rm vmlinuz-5.8.0-41-generic System.map-5.8.0-41-generic config-5.8.0-41-generic
Now you should be finally ready to update grub
sudo update-grub && reboot
Now when you load back in you should be able to install RocM
sudo apt install rocm-dkms
As per the official notes in this link, AMD ROCm platform is designed to support Ubuntu 20.04.1 (5.4 and 5.6-oem) and 18.04.5 (Kernel 5.4).
So kernel version 5.8 is not supported. However, downgrading is an option but instead of rushing to that, you can simply boot into an older version of kernel.
Try following steps:
Restart your computer,
Wait for the grub menu to open (how to open grub menu: link).
Select advanced options for ubuntu
Select an alternate kernal from the list shown.

Cannot install mysql on Ubuntu 17.10 Gnome 3.26.2

Trying to install mysql, I always get the following error:
Errors were encountered while processing:
/var/cache/apt/archives/mysql-server-5.7_5.7.21-0ubuntu0.17.10.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
See in full below:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
mailx tinyca
The following NEW packages will be installed:
mysql-server-5.7
0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
Need to get 0 B/3,184 kB of archives.
After this operation, 48.3 MB of additional disk space will be used.
Preconfiguring packages ...
(Reading database ... 283762 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.7_5.7.21-0ubuntu0.17.10.1_amd64.deb ...
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
invoke-rc.d returned 5
There is a MySQL server running, but we failed in our attempts to stop it.
Stop it yourself and try again!
dpkg: error processing archive /var/cache/apt/archives/mysql-server-5.7_5.7.21-0ubuntu0.17.10.1_amd64.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/mysql-server-5.7_5.7.21-0ubuntu0.17.10.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I have tried this solution
as well as almost every solution available on stackoverflow but it doesn't solve my problem
Even mysql server is not entirely removed by sudo apt-get remove --purge mysql-server. I've to remove it by using synaptic manager

Automate MySQL install on Ubuntu 14.04 using Ansible

I'm trying to setup a Vagrant environment involving a few Ubuntu machines with Ansible and am having trouble writing an Ansible Playbook to automate the process. Primarily, I'm following the instructions from this answer - https://stackoverflow.com/a/26598887
Here is the snippet of the error I'm getting from running the playbook;
PLAY [web] ********************************************************************
GATHERING FACTS ***************************************************************
ok: [business-web1]
TASK: [Install MySQL] *********************************************************
failed: [business-web1] => (item=mysql-server) => {"failed": true, "item": "mysql-server"}
stderr: start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mysql-server-5.5 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.5; however:
Package mysql-server-5.5 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
mysql-server-5.5
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
stdout: Reading package lists...
Building dependency tree...
Reading state information...
mysql-server is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 52 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mysql-server-5.5 (5.5.44-0ubuntu0.14.04.1) ...
msg: '/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" install 'mysql-server'' failed: start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mysql-server-5.5 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.5; however:
Package mysql-server-5.5 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
mysql-server-5.5
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit #/home/vagrant/provision-business-mysql.retry
business-web1 : ok=1 changed=0 unreachable=0 failed=1
To the best of my understanding, it looks like the first 'install mysql' step isn't being run. To verify this, I managed to recreate the problem by running the ansible module directly from command line;
vagrant#mgmt:~$ ansible web -m apt -a "name=mysql-server update_cache=yes cache_valid_time=3600 state=latest" --sudo
business-web1 | FAILED >> {
"failed": true,
"msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\" install 'mysql-server'' failed: start: Job failed to start\ninvoke-rc.d: initscript mysql, action \"start\" failed.\ndpkg: error processing package mysql-server-5.5 (--configure):\n subprocess installed post-installation script returned error exit status 1\ndpkg: dependency problems prevent configuration of mysql-server:\n mysql-server depends on mysql-server-5.5; however:\n Package mysql-server-5.5 is not configured yet.\n\ndpkg: error processing package mysql-server (--configure):\n dependency problems - leaving unconfigured\nNo apport report written because the error message indicates its a followup error from a previous failure.\nErrors were encountered while processing:\n mysql-server-5.5\n mysql-server\nE: Sub-process /usr/bin/dpkg returned an error code (1)\n",
"stderr": "start: Job failed to start\ninvoke-rc.d: initscript mysql, action \"start\" failed.\ndpkg: error processing package mysql-server-5.5 (--configure):\n subprocess installed post-installation script returned error exit status 1\ndpkg: dependency problems prevent configuration of mysql-server:\n mysql-server depends on mysql-server-5.5; however:\n Package mysql-server-5.5 is not configured yet.\n\ndpkg: error processing package mysql-server (--configure):\n dependency problems - leaving unconfigured\nNo apport report written because the error message indicates its a followup error from a previous failure.\nErrors were encountered while processing:\n mysql-server-5.5\n mysql-server\nE: Sub-process /usr/bin/dpkg returned an error code (1)\n",
"stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nmysql-server is already the newest version.\n0 upgraded, 0 newly installed, 0 to remove and 52 not upgraded.\n2 not fully installed or removed.\nAfter this operation, 0 B of additional disk space will be used.\nSetting up mysql-server-5.5 (5.5.44-0ubuntu0.14.04.1) ...\n"
}
vagrant#mgmt:~$
Any idea how I can get mysql installed and a DB setup using Ansible?
I had this same error occurring trying to install mysql on a fresh ubuntu/trusty64 box. Crazily enough it turned out to be due to the VM instance having less than 512MB of memory. Make sure your Vagrantfile allots your VM enough memory.
config.vm.provider "virtualbox" do |vb|
vb.memory = "512"
end
#MicahElliott points into the right direction. The error is not related to ansible, but to apt.
E: Sub-process /usr/bin/dpkg returned an error code (1)
stdout: Reading package lists...
Building dependency tree...
Reading state information...
mysql-server is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 52 not upgraded.
2 not fully installed or removed.
Look here for a solution: https://askubuntu.com/a/438843/231051

Getting dependency issues on configuring dpkg

$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
8 not fully installed or removed.
Need to get 0 B/49.7 kB of archives.
After this operation, 0 B of additional disk space will be used.
dpkg: error processing package python-debian (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: dependency problems prevent configuration of update-notifier-common:
update-notifier-common depends on python-debian; however:
Package python-debian is not configured yet.
dpkg: error processing package update-notifier-common (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of apt-xapian-index:
apt-xapian-index depends on python-debian (>= 0.1.14); however:
Package python-debian is not configured yet.
dpkg: error processing package apt-xapian-index (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of flashplugin-installer:
flashplugin-installer depends on update-notifier-common (>= 0.119ubuntu2); however:
Package update-notifier-common is not configured yet.
dpkg: error processing package flashplugin-installer (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-aptdaemon:
python-aptdaemon dependNo apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
s on python-debian; however:
Package python-debian is not configured yet.
dpkg: error processing package python-aptdaemon (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-aptdaemon.gtk3widgets:
python-aptdaemon.gtk3widgets depends on python-aptdaemon (= 1.1.1-1ubuntu5); however:
Package python-aptdaemon is not configured yet.
dpkg: error processing package python-aptdaemon.gtk3widgets (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of software-center:
software-center depends on python-aptdaemon (>= 0.40); however:
Package python-aptdaemon is not configured yet.
software-center depends on python-aptdaemon.gtk3widgets; however:
Package python-aptdaemon.gtk3widgets is not configured yet.
dpkg: error processing package software-center (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of sessioninstaller:
sessioninstaller depends on python-aptdaemon.gtk3widgets; however:
Package python-aptdaemon.gtk3widgets is not configured yet.
dpkg: error processing package sessioninstaller (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
E: Sub-process /usr/bin/dpkg returned an error code (1)
I am getting this error when i am trying to configure dpkg...
please tell me what to do..i am stuck.
There is obviously something wrong with your dpkg.
Run this:
sudo dpkg --configure -a
this will make dpkg repairs itself
Then run your installations again.
If it doesn't work run:
sudo apt-get install -f
and again
sudo dpkg --configure -a
This should do the trick

can't install QGis in ubuntu 12.04

I can't install QGis in ubuntu12.04. I got following error.
$ sudo apt-get install qgis
[sudo] password for anju:
Reading package lists... Done
Building dependency tree
Reading state information... Done
qgis is already the newest version.
The following packages were automatically installed and are no longer required:
libnss3-dev libnspr4-dev
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 574 not upgraded.
5 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? Y
Setting up qgis-providers-common (1.8.0-1~precise2) ...
/usr/lib/qgis/crssync: symbol lookup error: /usr/lib/libgdal.so.1: undefined symbol: pj_ctx_alloc
dpkg: error processing qgis-providers-common (--configure):
subprocess installed post-installation script returned error exit status 127
dpkg: dependency problems prevent configuration of qgis-providers:
qgis-providers depends on qgis-providers-common (= 1.8.0-1~precise2); however:
Package qgis-providers-common is not configured yet.
dpkg: error processing qgis-providers (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of qgis:
qgis depends on qgis-providers (= 1.8.0-1~precise2); however:
Package qgis-providers is not configured yet.
dpkg: error processing qgis (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of qgis-plugin-globe:
qgis-plugin-globe depends on qgis (= 1.8.0-1~precise2); however:
Package qgis is not configured yet.
dpkg: error processing qgis-plugin-globe (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuNo apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
ration of qgis-plugin-grass:
qgis-plugin-grass depends on qgis (= 1.8.0-1~precise2); however:
Package qgis is not configured yet.
dpkg: error processing qgis-plugin-grass (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
qgis-providers-common
qgis-providers
qgis
qgis-plugin-globe
qgis-plugin-grass
E: Sub-process /usr/bin/dpkg returned an error code (1)
Please help me..
It looks like the gem is installed, but its dependencies aren't configured properly.
Try running sudo dpkg-reconfigure qgis to reconfigure them.
Follow the steps in the following link, it fixed the symbol look up error in qgis.
http://ubuntuforums.org/showthread.php?t=1764127
If I remove QGIS, then I can't re install it back!