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.
Related
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
I receive the following error when using RVM to install ruby with rvm install 2.3.0. This is from the log file RVM produces.
Setting up vsftpd (3.0.3-8+b1) ...
vsftpd user (ftp) already exists, doing nothing.
mkdir: cannot create directory ‘/srv/ftp’: Permission denied
dpkg: error processing package vsftpd (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
vsftpd
E: Sub-process /usr/bin/dpkg returned an error code (1)
Infact, anytime I run an apt-get install command I always get this warning about vsftpd. I have always just ignored it as packages install just fine. The main problem now is that RVM is now picking up on this error as being critical so it stops installing Ruby.
The problem is that the folder /srv/ftp physically can not be created even by root (or at least I don't know how to). The way my server is set up is that the /srv/ folder only exists to mount external disk drives so I can't create an arbitrary folder here.
E.g. datadisk01 would be mounted onto /srv/datadisk01
Is there a way to change where vsftpd creates this ftp folder to a different location so it will run properly? OR is there a way I can force RVM to ignore this error message?
I would prefer the answer that fixes the error but my main objective is just to get Ruby installed.
I have already tried removing vsftpd with apt-get but it still persists.
My MySql is not working. When I want to reinstall MySql on linux server the I it shows following message.
sudo apt install mysql-server mysql-client --fix-broken
message:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package mysql-server-5.7 needs to be reinstalled, but I can't find an archive for it.
Try sudo dpkg --remove --force-all mysql-server-5.7
If that doesn't work,
sudo vim /var/lib/dpkg/status
You can do this with any text editor.
After you open that find the section about mysql-server-5.7. Delete the section with the information pertaining to it and save the file. Make sure you do a backup of the status file before you do this.
Reinstall your package using apt-get install
In my case, the installation was messed up and I had to remove the requirement with dpkg
I received a message like:
E: The package <package-name> needs to be reinstalled, but I can't find an archive for it.
I was able to resolve like this:
Query faulty packages using dkpg
$ dpkg -C
The following packages are in a mess due to serious problems during
installation. They must be reinstalled for them (and any packages
that depend on them) to function properly:
<package-name> (no description available)
The following packages are missing the list control file in the
database, they need to be reinstalled:
<package-name> (no description available)
The following packages are missing the md5sums control file in the
database, they need to be reinstalled:
<package-name> (no description available)
force-remove install requirement for each listed package
$ sudo dpkg --remove --force-remove-reinstreq <package-name>
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
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.