MYSQL Installation does not work - mysql

I got this error:
root#bananapi:~# sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
mysql-server-5.5
Suggested packages:
mailx tinyca
Recommended packages:
libhtml-template-perl
The following NEW packages will be installed:
mysql-server-5.5
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
9 not fully installed or removed.
Need to get 0 B/1616 kB of archives.
After this operation, 29.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Preconfiguring packages ...
(Reading database ... 54015 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.5_5.5.54-0+deb8u1_armhf.deb ...
groupadd: existing lock file /etc/group.lock without a PID
groupadd: cannot lock /etc/group; try again later.
addgroup: `/usr/sbin/groupadd -g 114 mysql' returned error code 10. Exiting.
dpkg: error processing archive /var/cache/apt/archives/mysql-server- 5.5_5.5.54-0+deb8u1_armhf.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/mysql-server-5.5_5.5.54-0+deb8u1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I tried many different solutions, but for me nothing worked. So i purged and reinstalled it, but it does not work.
Can you help me with this problem?

Related

Received Linux "Error: BrokenCount > 0" after trying to fix mysql install?

I tried fixing a mysql install after getting error codes. I tried removing then reinstalling. I tried installing mariadb and removing. Then tried again. Eventually something happened and got "Error: BrokenCount > 0". So the package manager is broken. I tried sudo apt -f install and I get the following messages in the terminal.
user#linux:~$ sudo apt -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
galera-3 libconfig-inifiles-perl libdbi-perl libreadline5 socat
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
mysql-server-8.0
Suggested packages:
mailx tinyca
The following NEW packages will be installed:
mysql-server-8.0
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/1,329 kB of archives.
After this operation, 1,536 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
(Reading database ... 218690 files and directories currently installed.)
Preparing to unpack .../mysql-server-8.0_8.0.26-0ubuntu0.20.04.3_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-8.0_8.0.26-0
ubuntu0.20.04.3_amd64.deb (--unpack):
new mysql-server-8.0 package pre-installation script subprocess returned error
exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/mysql-server-8.0_8.0.26-0ubuntu0.20.04.3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Assistance with this problem would be appreciated.
I used the following two posts to resolve my problem.
mysql.service is missing but shows up on list - fails install
https://askubuntu.com/questions/1012223/0-upgraded-0-newly-installed-0-to-remove-and-0-not-upgraded-1-not-fully-insta

Raspberry dpkg "files list file for package '<pck_name>' missing AND cannot allocate memory

I have the following issue:
when I try to
apt-get upgrade
I receive some dpkg warning, (picture attached).
dpkg: warning: files list file for package 'php5-json' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'php5' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'php5-readline' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'php5-cli' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'php5-common' missing; assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
failed to allocate memory: cannot allocate memory
E: Sub-process /usr/bin/dpkg returned an error code (2)
This happens also when I try to install these singles packages, and when I try to remove them. I also tried without success to remove the whole apache2 and php5 packages. Either apt-get autoremove and autoclean followed by update and upgrade does not change the outcome.
I have some free space on SD card, and I tried some proposed solutions to similar issues:
Tried to manually delete .deb files in /var/cache/apt/archives/ as explained here
Tried to force reinstallation as explained here
Also tried a bunch of similar solutions, without success...
Please, can someone point me in the right direction? This problem leads to an error launching apache2, and I can't use my websites.
Thank you!
Try sudo apt-get install -f to fix your dependencies
Also sudo dpkg --configure -a to fix your installations

The program 'tclsh' is currently not installed?

I am trying to install the tcl/tk8.4 version on my ubuntu16.04 machine. After completing the apt-get install command. if i type tclsh command. I am getting this error message saying:The program 'tclsh' is currently not installed. You can install it by typing. sudo atp-get install tcl.
The steps followed are as follows:
1. I have removed the latest tcl/tk8.6, using autoremove commands
2.dccom#dccom-vm:~$ sudo apt-get install tk8.4 tcl8.4
[sudo] password for dccom:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libtk8.4
Suggested packages:
tcl-tclreadline
The following NEW packages will be installed:
libtk8.4 tcl8.4 tk8.4
0 upgraded, 3 newly installed, 0 to remove and 350 not upgraded.
Need to get 567 kB/581 kB of archives.
After this operation, 1.858 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://id.archive.ubuntu.com/ubuntu xenial/universe i386 libtk8.4
i386 8.4.20-8 [556 kB]
Get:2 http://id.archive.ubuntu.com/ubuntu xenial/universe i386 tk8.4 i386
8.4.20-8 [11,5 kB]
Fetched 567 kB in 1s (331 kB/s)
Selecting previously unselected package libtk8.4:i386.
(Reading database ... 276714 files and directories currently installed.)
Preparing to unpack .../libtk8.4_8.4.20-8_i386.deb ...
Unpacking libtk8.4:i386 (8.4.20-8) ...
Selecting previously unselected package tcl8.4.
Preparing to unpack .../tcl8.4_8.4.20-8_i386.deb ...
Unpacking tcl8.4 (8.4.20-8) ...
Selecting previously unselected package tk8.4.
Preparing to unpack .../tk8.4_8.4.20-8_i386.deb ...
Unpacking tk8.4 (8.4.20-8) ...
Processing triggers for libc-bin (2.23-0ubuntu4) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libtk8.4:i386 (8.4.20-8) ...
Setting up tcl8.4 (8.4.20-8) ...
Setting up tk8.4 (8.4.20-8) ...
Processing triggers for libc-bin (2.23-0ubuntu4) ...
Error info:
dccom#dccom-vm:~$ tclsh
The program 'tclsh' is currently not installed. You can install it by
typing:
sudo apt install tcl
Do I need to set any environment variables here ? Please suggest.
The tclsh program will be installed with the name tclsh8.4 by default; use which tclsh8.4 to find where it actually is. This makes it much easier to have multiple versions of Tcl in use on one system. However, if you want to make it default, you should use update-alternatives. Try typing this (at a root prompt or via sudo):
update-alternatives --config tclsh
You might also need a similar thing for wish (which is installed as wish8.4 by default).

phpMyAdmin - Error The json extension is missing

I have installed on Ubuntu PHP, MySQL, apache and phpmyadmin. When I try to open via browser phpmyadmin I got this error
phpMyAdmin - Error
The json extension is missing. Please check your PHP configuration.
There are a lot of similar thread and I have tried a lot of solutions provided in them but none is helped me to fix this issue. Firstly I tried to install this extension like sudo apt-get install php5-json and this is the result
sudo apt-get install php5-json
Reading package lists... Done
Building dependency tree
Reading state information... Done
php5-json is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
1 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 javascript-common (11) ...
dpkg: error processing package javascript-common (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
javascript-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
So obviously I have the latest version of php5-json - php5-json is already the newest version.
This is my version of Ubuntu
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"
But I have no idea how to fix the error?
Check last message from this link: Ubuntu Forum Thread: dpkg: javascript-common error
Next install "javascript-common" package, next json package.

sudo apt-get install xvfb

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libruby1.8
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
xserver-common
The following NEW packages will be installed:
xvfb
The following packages will be upgraded:
xserver-common
1 upgraded, 1 newly installed, 0 to remove and 308 not upgraded.
1 not fully installed or removed.
Need to get 0 B/899 kB of archives.
After this operation, 2,068 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Setting up apt (0.8.16~exp5ubuntu13.2) ...
gpg: symbol lookup error: /usr/local/lib/libreadline.so.6: undefined symbol: UP
gpg: symbol lookup error: /usr/local/lib/libreadline.so.6: undefined symbol: UP
dpkg: error processing apt (--configure):
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
apt
E: Sub-process /usr/bin/dpkg returned an error code (1)
Why I cannot install xvfb?
Get your admin to run this:
su
mkdir temp
mv /usr/local/lib/libreadline* temp
ldconfig
apt-get update
Then run your apt-get again
It seems the package xvfb uses the command "gpg" in the post install script. The gpg command seems to depend on libreadline, which does not seem to be compatible with gpg.
This is really strange. Usually a Debian/Ubuntu system does not install anything under /usr/local and the dependencies are in order. Could it be you have yourself installed libreadline into /usr/local/lib?
Ask the package manager which package owns the file /usr/local/lib/libreadline.so.6:
dpkg -S /usr/local/lib/libreadline.so.6
If it tells you a package where the file belongs, try to remove that package with
dpkg -P packagename
If no package owns it, remove the file.
If you want to keep /usr/local/lib/libreadline.so.6 and still have a working system, you should prevent programs from using it unless explicitly told to do so. You have probably modified the dynamic linker configuration in /etc/ld.so.conf. Undo those changes to get back to a working system.