problem ragarding apt-get upgrade

New to Debian (Or Linux in general)? Ask your questions here!

Re: problem ragarding apt-get upgrade

Postby tr64 » 2015-08-14 04:35

root@zx:/home/qwerty# su -c 'apt-get --purge remove ldap-account-manager'
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
ldap-account-manager*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 34.5 MB disk space will be freed.
Do you want to continue? [Y/n] y
dpkg: error processing package ldap-account-manager (--purge):
package is in a very bad inconsistent state; you should
reinstall it before attempting a removal
Errors were encountered while processing:
ldap-account-manager
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@zx:/home/qwerty# dpkg-reconfigure ldap-account-manager
/usr/sbin/dpkg-reconfigure: ldap-account-manager is broken or not fully installed
root@zx:/home/qwerty#

F***. son of a *****. :|
tr64
 
Posts: 23
Joined: 2015-08-12 10:27

Re: problem ragarding apt-get upgrade

Postby tr64 » 2015-08-14 04:51

also tried:

root@zx:/home/qwerty# dpkg --remove --force remove-reinstreq ldap-account-manager
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: package is in a very bad inconsistent state; you should
reinstall it before attempting a removal
dpkg: warning: files list file for package 'liba52-0.7.4' missing; assuming package has no files currently installed
(Reading database ... 363994 files and directories currently installed.)
Removing ldap-account-manager (4.7.1-1) ...
Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript apache2, action "reload" failed.
dpkg: error processing package ldap-account-manager (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
ldap-account-manager

apt-get -o Debug::pkgProblemResolver=yes remove ldap-account-manager
Reading package lists... Done
Building dependency tree
Reading state information... Done
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
The following packages will be REMOVED:
ldap-account-manager
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 34.5 MB disk space will be freed.
Do you want to continue? [Y/n] y
dpkg: error processing package ldap-account-manager (--remove):
package is in a very bad inconsistent state; you should
reinstall it before attempting a removal
Errors were encountered while processing:
ldap-account-manager
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@zx:/home/qwerty#
tr64
 
Posts: 23
Joined: 2015-08-12 10:27

Re: problem ragarding apt-get upgrade

Postby kiyop » 2015-08-14 10:14

tr64 wrote:I don't have a web server .
I'm simply using debian 8.1 with no server or anything such
after upgrading .this error just apeared.

I am confused. :?:
Let me confirm that you did not upgrade your debian from wheezy to jessie. Did you?
How did you install the debian?

Execute the following and post the results:
kiyop wrote:Try also
Code: Select all
journalctl -xn
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/
User avatar
kiyop
 
Posts: 3984
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan

Re: problem ragarding apt-get upgrade

Postby tr64 » 2015-08-14 10:28

I downloaded the debian 8 dvd from the website and installed it via USB flash drive
Then I Upgraded it from 8 to 8.1 .
Soon after when I wanted to apt-upgrade it and this error appeared.
(durnig the 8.1 upgrade ,there was some internet disconnectivity in between.It could be the reason for this error )

I also tried commenting "set -e" in "ldap-account-manager" config files in /var/lib/dpkg/info
no luck !
tr64
 
Posts: 23
Joined: 2015-08-12 10:27

Re: problem ragarding apt-get upgrade

Postby kiyop » 2015-08-14 10:38

Thank you for replying :)
tr64 wrote:I downloaded the debian 8 dvd from the website and installed it via USB flash drive
Then I Upgraded it from 8 to 8.1 .

Did you execute the following?
Code: Select all
apt-get update
apt-get upgrade


tr64 wrote:Soon after when I wanted to apt-upgrade it and this error appeared.
(durnig the 8.1 upgrade ,there was some internet disconnectivity in between.It could be the reason for this error )

I wonder if it could not.

Execute the following with root privilege and post the results:
Code: Select all
journalctl -xn
dpkg-query -s ldap-account-manager


How about trying
Code: Select all
apt-get update
apt-get dist-upgrade -f


tr64 wrote:I also tried commenting "set -e" in "ldap-account-manager" config files in /var/lib/dpkg/info

I wonder if it made the problem worse...
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/
User avatar
kiyop
 
Posts: 3984
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan

Re: problem ragarding apt-get upgrade

Postby tr64 » 2015-08-14 12:40

I upgraded via synaptic the first time.
but now I can't either upgrade with synaptic or terminal emulator.
As for the "set -e" problem, I can just uncomment it to get restored to the previous state if it is necessary. that's np.

root@zx:/home/qwerty# journalctl -xn
-- Logs begin at Fri 2015-08-14 16:44:28 IRDT, end at Fri 2015-08-14 16:57:31 IR
Aug 14 16:57:31 zx NetworkManager[469]: <info> plen 24 (255.255.255.0)
Aug 14 16:57:31 zx NetworkManager[469]: <info> gateway 192.168.1.1
Aug 14 16:57:31 zx NetworkManager[469]: <info> server identifier 192.168.1.1
Aug 14 16:57:31 zx NetworkManager[469]: <info> lease time 600
Aug 14 16:57:31 zx NetworkManager[469]: <info> hostname 'zx'
Aug 14 16:57:31 zx NetworkManager[469]: <info> nameserver '192.168.1.1'
Aug 14 16:57:31 zx dbus[513]: [system] Activating via systemd: service name='org
Aug 14 16:57:31 zx dbus[513]: [system] Successfully activated service 'org.freed
Aug 14 16:57:31 zx nm-dispatcher[4409]: Dispatching action 'dhcp4-change' for et
Aug 14 16:57:31 zx dhclient[1451]: bound to 192.168.1.69 -- renewal in 213 secon
lines 1-11/11 (END)
************************************************************************************************************
root@zx:/home/qwerty# dpkg-query -s ldap-account-manager
Package: ldap-account-manager
Status: deinstall reinstreq half-installed
Priority: extra
Section: web
Installed-Size: 33674
Maintainer: Roland Gruber <post@rolandgruber.de>
Architecture: all
Version: 4.7.1-1
Depends: php5 (>= 5.2.4), php5-ldap, php5-gd, php5-json, apache2 | httpd, php-fpdf (>= 1.7), debconf (>= 0.5) | debconf-2.0
Recommends: php-apc
Suggests: ldap-server, php5-mcrypt, ldap-account-manager-lamdaemon, perl
Conffiles:
/etc/ldap-account-manager/nginx.conf eebe518b2d70da9ed43101598b26db11
/etc/ldap-account-manager/apache.conf faefdede2746f46cd721279a46e5a455
/etc/ldap-account-manager/config.cfg 730ec7132212a0b59fa4252a1e36d777
Description: webfrontend for managing accounts in an LDAP directory
LDAP Account Manager (LAM) runs on an existing webserver.
It manages user, group and host accounts. Currently LAM
supports these account types: Samba 3/4, Unix, Kolab 2/3,
address book entries, NIS mail aliases and MAC addresses.
There is an integrated LDAP browser to allow access to the
raw LDAP attributes. You can use templates
for account creation and use multiple configuration profiles.
Account information can be exported as PDF file. There is also
a script included which manages quotas and homedirectories.
Homepage: https://www.ldap-account-manager.org/
root@zx:/home/qwerty#

*****************************************************************************************************
root@zx:/home/qwerty# journalctl -xn
-- Logs begin at Fri 2015-08-14 16:44:28 IRDT, end at Fri 2015-08-14 17:05:37 IR
Aug 14 17:05:01 zx CRON[5038]: (cricket) CMD (test -x /usr/share/cricket/collect
Aug 14 17:05:01 zx CRON[5040]: (munin) CMD (if [ -x /usr/bin/munin-cron ]; then
Aug 14 17:05:01 zx CRON[5039]: (root) CMD (if [ -x /etc/munin/plugins/apt_all ];
Aug 14 17:05:01 zx CRON[5036]: pam_unix(cron:session): session closed for user r
Aug 14 17:05:01 zx CRON[5035]: pam_unix(cron:session): session closed for user c
Aug 14 17:05:09 zx CRON[5037]: pam_unix(cron:session): session closed for user m
Aug 14 17:05:32 zx su[4400]: pam_unix(su:session): session closed for user root
Aug 14 17:05:37 zx su[5557]: Successful su for root by qwerty
Aug 14 17:05:37 zx su[5557]: + /dev/pts/0 qwerty:root
Aug 14 17:05:37 zx su[5557]: pam_unix(su:session): session opened for user root
lines 1-11/11 (END)

is the last command results ok ?
I guess there's more to it than that,but I can't see the rest of the results.or maybe that's it.
tr64
 
Posts: 23
Joined: 2015-08-12 10:27

Re: problem ragarding apt-get upgrade

Postby tr64 » 2015-08-14 12:42

root@zx:/home/qwerty# apt-get update
Ign http://security.debian.org jessie/updates InRelease
Get:1 http://security.debian.org jessie/updates Release.gpg [1,554 B]
Get:2 http://security.debian.org jessie/updates Release [61.5 kB]
Hit http://ftp.de.debian.org jessie InRelease
Hit http://ftp.de.debian.org jessie/main Sources
Hit http://ftp.de.debian.org jessie/contrib Sources
Hit http://ftp.de.debian.org jessie/non-free Sources
Hit http://ftp.de.debian.org jessie/main amd64 Packages
Hit http://ftp.de.debian.org jessie/contrib amd64 Packages
Hit http://ftp.de.debian.org jessie/non-free amd64 Packages
Get:3 http://security.debian.org jessie/updates/main Sources [81.7 kB]
Hit http://ftp.de.debian.org jessie/main i386 Packages
Hit http://ftp.de.debian.org jessie/contrib i386 Packages
Hit http://ftp.de.debian.org jessie/non-free i386 Packages
Hit http://ftp.de.debian.org jessie/contrib Translation-en
Hit http://ftp.de.debian.org jessie/main Translation-en
Hit http://ftp.de.debian.org jessie/non-free Translation-en
Get:4 http://security.debian.org jessie/updates/contrib Sources [1,453 B]
Get:5 http://security.debian.org jessie/updates/non-free Sources [14 B]
Get:6 http://security.debian.org jessie/updates/main amd64 Packages [129 kB]
Get:7 http://security.debian.org jessie/updates/contrib amd64 Packages [2,488 B]
Get:8 http://security.debian.org jessie/updates/non-free amd64 Packages [14 B]
Get:9 http://security.debian.org jessie/updates/main i386 Packages [130 kB]
Get:10 http://security.debian.org jessie/updates/contrib i386 Packages [2,500 B]
Get:11 http://security.debian.org jessie/updates/non-free i386 Packages [14 B]
Get:12 http://security.debian.org jessie/updates/contrib Translation-en [1,098 B]
Get:13 http://security.debian.org jessie/updates/main Translation-en [71.4 kB]
Get:14 http://security.debian.org jessie/updates/non-free Translation-en [14 B]
Fetched 483 kB in 19s (24.6 kB/s)
Reading package lists... Done
root@zx:/home/qwerty# apt-get dist-upgrade -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/10.7 MB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg: error processing package ldap-account-manager (--configure):
package ldap-account-manager is not ready for configuration
cannot configure (current status `half-installed')
Errors were encountered while processing:
ldap-account-manager
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@zx:/home/qwerty#
tr64
 
Posts: 23
Joined: 2015-08-12 10:27

Re: problem ragarding apt-get upgrade

Postby fireExit » 2015-08-14 15:22

this is a nuclear solution and you should only apply it if you really don't need that package:
Code: Select all
cd /var/lib/dpkg/info

Code: Select all
rm ldap-account-manager.*

Code: Select all
dpkg --remove --force-remove-reinstreq ldap-account-manager

basically what you are doing is removing the package's files manually.

after this, dist-upgrade should complete without error.
User avatar
fireExit
 
Posts: 559
Joined: 2014-11-20 11:22

Re: problem ragarding apt-get upgrade

Postby tr64 » 2015-08-14 20:55

Thanks a lot. the error is gone for good.
I tried to install it again via synaptic .but the same error came along when I was installing it.
Is there any harm to my computer regarding installing other packages?
I mean ,can I install other packages that need this package as a dependency?
tr64
 
Posts: 23
Joined: 2015-08-12 10:27

Re: problem ragarding apt-get upgrade

Postby fireExit » 2015-08-14 21:48

good to know!
last night i tried to install it (as a simulation) but used apt, not synaptic and had no problems (can't say for sure if that would make a big difference)
Code: Select all
fireexit@jessie:~$ cat /var/log/dpkg.log | grep ldap-account-manager
2015-08-13 23:42:53 install ldap-account-manager:all <none> 4.7.1-1
2015-08-13 23:42:53 status half-installed ldap-account-manager:all 4.7.1-1
2015-08-13 23:43:07 status unpacked ldap-account-manager:all 4.7.1-1
2015-08-13 23:43:07 status unpacked ldap-account-manager:all 4.7.1-1
2015-08-13 23:43:24 configure ldap-account-manager:all 4.7.1-1 <none>
2015-08-13 23:43:24 status unpacked ldap-account-manager:all 4.7.1-1
2015-08-13 23:43:24 status unpacked ldap-account-manager:all 4.7.1-1
2015-08-13 23:43:24 status unpacked ldap-account-manager:all 4.7.1-1
2015-08-13 23:43:24 status unpacked ldap-account-manager:all 4.7.1-1
2015-08-13 23:43:24 status half-configured ldap-account-manager:all 4.7.1-1
2015-08-13 23:43:25 status installed ldap-account-manager:all 4.7.1-1
2015-08-14 16:08:02 status installed ldap-account-manager:all 4.7.1-1
2015-08-14 16:08:02 remove ldap-account-manager:all 4.7.1-1 <none>
2015-08-14 16:08:02 status half-configured ldap-account-manager:all 4.7.1-1
2015-08-14 16:08:02 status half-installed ldap-account-manager:all 4.7.1-1
2015-08-14 16:08:03 status config-files ldap-account-manager:all 4.7.1-1
2015-08-14 16:08:03 purge ldap-account-manager:all 4.7.1-1 <none>
2015-08-14 16:08:03 status config-files ldap-account-manager:all 4.7.1-1
2015-08-14 16:08:03 status config-files ldap-account-manager:all 4.7.1-1
2015-08-14 16:08:03 status config-files ldap-account-manager:all 4.7.1-1
2015-08-14 16:08:03 status config-files ldap-account-manager:all 4.7.1-1
2015-08-14 16:08:03 status config-files ldap-account-manager:all 4.7.1-1
2015-08-14 16:08:03 status not-installed ldap-account-manager:all <none>
fireexit@jessie:~$

tr64 wrote:I mean ,can I install other packages that need this package as a dependency?

it's a very specific package, unless you are installing a web-server you won't see it again and even then you almost certainly have to install it explicitly.
User avatar
fireExit
 
Posts: 559
Joined: 2014-11-20 11:22

Re: problem ragarding apt-get upgrade

Postby tr64 » 2015-08-14 22:04

thanks a lot.
I certainly won't be needing any server use for debian.
I executed your last code.it was very similar to yours.
the problem is bypassed and NOT SOLVED.
but thank u all for helping me.
VIVA linux
tr64
 
Posts: 23
Joined: 2015-08-12 10:27

Re: problem ragarding apt-get upgrade

Postby kiyop » 2015-08-15 00:27

fireExit wrote:this is a nuclear solution and you should only apply it if you really don't need that package:
Code: Select all
cd /var/lib/dpkg/info

Code: Select all
rm ldap-account-manager.*

Code: Select all
dpkg --remove --force-remove-reinstreq ldap-account-manager

basically what you are doing is removing the package's files manually.

after this, dist-upgrade should complete without error.

tr64 wrote:Thanks a lot. the error is gone for good.

Thank fireExit for telling nice commands to remove the broken package :)
Congratulations on tr64's success :)

Have you executed
Code: Select all
apt-get update
apt-get -s autoremove

to see what packages can be removed?
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/
User avatar
kiyop
 
Posts: 3984
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan

Re: problem ragarding apt-get upgrade

Postby tr64 » 2015-08-15 06:53

Once again,Thank you all.

root@zx:/home/qwerty# apt-get -s autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@zx:/home/qwerty#

apparently nothing can be removed
tr64
 
Posts: 23
Joined: 2015-08-12 10:27

Re: problem ragarding apt-get upgrade

Postby serandrzej » 2018-04-06 18:12

I guess, you have solved the problem by now somehow, in which case I post it just for posterity and out of gratitude to a.thomas, because the issue was giving me a lot of headache and headscratching,
and also in case someone comes up with ideas how to fully fix the issue. I found this post:

https://ubuntuforums.org/archive/index. ... 81086.html

and thanks to the author I managed at least to get rid of ldap-acoount-manager and be able to run regular upgrade.
admittedly, unlike in the original solution, I failed to reinstall ldap-account-manager because once reinstalled, it was already "in a mess" and in "half-installed" status.
ps.
I run debian 8 jessie oldstable on asus X102BA - if this can be helpful for further analysing why reinstallation failed.

ps 2
err.. I've just realised that my posts don't add up too much, and are helpful only to the point of removing lam. I got slightly lost in the multitude of threads abt the issue at hand, and beside the solution herein didn't quite work for me, and this in turn is probably because I might have messed up sth in the procedure or sequence of commands etc. my apologies. I dont remove my posts myself, after all they describe a bit different approach, however feel free to delete them if you find it necessary.
Last edited by serandrzej on 2018-04-07 17:17, edited 2 times in total.
serandrzej
 
Posts: 2
Joined: 2015-03-10 10:00

Re: problem ragarding apt-get upgrade

Postby serandrzej » 2018-04-06 19:44

I feel obliged to make a small update and quote original post, just in case someone might complain about "link-only" answers:

Well, after extension searching and finding things I already tried, I went to where the phpmyadmin.prerm, phpmyadmin.postrm, etc scripts where and deleted them manually.


cd /var/lib/dpkg/info/

ls -l phpmyadmin.*
-rw-r--r-- 1 root root 165 2008-03-05 21:42 phpmyadmin.conffiles
-rwxr-xr-x 1 root root 287 2008-03-05 21:42 phpmyadmin.config
-rw-r--r-- 1 root root 33524 2008-08-06 11:31 phpmyadmin.list
-rw-r--r-- 1 root root 51996 2008-03-05 21:42 phpmyadmin.md5sums
-rwxr-xr-x 1 root root 3286 2008-03-05 21:42 phpmyadmin.postinst
-rwxr-xr-x 1 root root 1762 2008-03-05 21:42 phpmyadmin.postrm
-rwxr-xr-x 1 root root 1762 2008-08-06 09:12 phpmyadmin.postrm.orig
-rwxr-xr-x 1 root root 339 2008-03-05 21:42 phpmyadmin.preinst
-rw-r--r-- 1 root root 22441 2008-03-05 21:42 phpmyadmin.templates

then I deleted those files

sudo rm -r phpmyadmin.*

then I ran

sudo apt-get clean

sudo apt-get update

I wanted to see if the package was still around, so I ran

sudo apt-get remove phpmyadmin

I got the response that the package was not installed so it couldn't not be removed.

FINALLY!

So from there I just ran

sudo apt-get install phpmyadmin


and I ran these commands:
#cd /var/lib/dpkg/info/
#ls -l ldap*
#sudo rm -r ldap*
#ls -l ldap*
#sudo apt-get clean
sudo apt-get update
#sudo apt-get remove -f ldap-account-manager


and source again:
https://ubuntuforums.org/archive/index. ... 81086.html

as said, it work for me, after that I was able to remove, but not install, the problematic package (ldap-account-manager in my case)
serandrzej
 
Posts: 2
Joined: 2015-03-10 10:00

Previous

Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable