maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Help, package remove error (https://talk.maemo.org/showthread.php?t=61729)

pinkfloyd 2010-09-05 02:53

Help, package remove error
 
Code:

Do you want to continue [Y/n]? y
(Reading database ... 102158 files and directories currently installed.)
Removing php5-common ...
dpkg (subprocess): unable to execute post-removal script: No such file or directory
dpkg: error processing php5-common (--remove):
 subprocess post-removal script returned error exit status 2
Errors were encountered while processing:
 php5-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
Nokia-N900-51-1:~#


Code:

Nokia-N900-51-1:~# apt-get remove php5-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  php5-common
0 upgraded, 0 newly installed, 1 to remove and 77 not upgraded.
1 not fully installed or removed.
After this operation, 537kB disk space will be freed.
Do you want to continue [Y/n]? y
dpkg: error processing php5-common (--remove):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
Errors were encountered while processing:
 php5-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
Nokia-N900-51-1:~#

Any clues how to fix this?

dchky 2010-09-05 05:26

Re: Help, package remove error
 
Do you have the file /var/lib/dpkg/info/php5-common.postrm ?

If not create one as follows - then try to remove php5-common again:

Code:

#! /bin/bash

set -e

if [ "$1" = "purge" ]
then
    rm -rf /var/lib/php5
fi

exit 0

If that doesn't work - then like the error message says - try to reinstall it, and then remove.

apt-get --reinstall install php5-common
apt-get --purge remove php5-comon

pinkfloyd 2010-09-05 06:06

Re: Help, package remove error
 
I do have the postrm script. But still i cant install upgrade or remove php5-common :/

Code:

Reading package lists... Done
Building dependency tree     
Reading state information... Done
The following packages were automatically installed and are no longer required:
  php5-common
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 77 not upgraded.
1 not fully installed or removed.
Need to get 0B/220kB of archives.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 102154 files and directories currently installed.)
Preparing to replace php5-common 5.2.6-6maemo5 (using .../php5-common_5.2.6-6maemo5_armel.deb) ...
Unpacking replacement php5-common ...
dpkg (subprocess): unable to execute old post-removal script: No such file or directory
dpkg: warning - old post-removal script returned error exit status 2
dpkg - trying script from the new package instead ...
dpkg (subprocess): unable to execute new post-removal script: No such file or directory
dpkg: error processing /var/cache/apt/archives/php5-common_5.2.6-6maemo5_armel.deb (--unpack):
 subprocess new post-removal script returned error exit status 2
dpkg (subprocess): unable to execute new post-removal script: No such file or directory
dpkg: error while cleaning up:
 subprocess post-removal script returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/php5-common_5.2.6-6maemo5_armel.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
/var/lib/dpkg/info #


pinkfloyd 2010-09-06 04:15

Re: Help, package remove error
 
Any other ideas? i cant find a way to fix this issue =(

Rob1n 2010-09-06 08:17

Re: Help, package remove error
 
If the post-removal script dchky posted above is the one that's actually being used, then it will only work if you have bash installed. Either install bash or change the first line of the script to read "#!/bin/sh" instead.

pinkfloyd 2010-09-06 11:47

Re: Help, package remove error
 
Thanks that solved it!!! I did not think about it!! lol
TY very much Rob1n

Bzzz 2010-10-20 03:30

Re: Help, package remove error
 
Same problem here.../var/lib/dpkg/info/php5-common.postrm was there, but with no bash installed...:rolleyes:

Thank you very much! :)

pursueky 2010-11-15 16:10

Re: Help, package remove error
 
great thx !!!
all of U

anapospastos 2010-11-27 18:22

Re: Help, package remove error
 
I installed tweakflashver package and for a reason I dont know why it got broke. When I m trying to remove it I ve got this message

Code:

dpkg: error processing tweakflashver (--remove):
Package is in a very bad inconsistent state - you should reinstall it before attempting a removal.
Errors were encountered while processing: tweakflashver
E: Sub-process /usr/bin/dpkg returned an error code (1)

and when Im trying to reinstall it this message

Code:

Preparing to replace tweakflashver 0.4.0-maemo1 (using .../tweakflashver_0.4.0-maemo1_armel.deb) ...
Unpacking replacement tweakflashver ...
dpkg: warning - old post-removal script returned error exit status 255
dpkg - trying script from the new package instead ...
dpkg: error processing /var/cache/apt/archives/tweakflashver_0.4.0-maemo1_armel.deb (--unpack):
subprocess new post-removal script returned error exit status 255
dpkg: error while cleaning up:
subprocess post-removal script returned error exit status 255
Processing triggers for catorise ...
###########################################################################################################################################################################Errors were encountered while processing:
/var/cache/apt/archives/tweakflashver_0.4.0-maemo1_armel.deb
Sub-process /usr/bin/dpkg returned an error code (1)

Can someone help me how to fix it?

edit: I solved my issue by doing a reboot, disabling extra-devel and trying to reinstall tweakflasher. It (re)installed and now it s working just nice.

sanotto 2011-08-23 03:44

Re: Help, package remove error
 
Just registered to say THX U One year later this answer (Change bash to sh) is still usefule kudos :)

jim_voy 2012-03-05 05:10

Re: Help, package remove error
 
@pinkfloyd how did you solve your problem please share it step by step it the same problem of mine. thanks...

jim_voy 2012-03-05 05:12

Re: Help, package remove error
 
@pinkfloyd how do you solve your problem? can you share it coz it the same problem of mine. thanks....

ibrakalifa 2012-03-12 09:38

Re: Help, package remove error
 
dpkg --configure -a

Mohammed Muid 2012-03-12 12:14

Re: Help, package remove error
 
BusyBox v1.19.3 (Debian 1.19.3power5) built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ $ root


BusyBox v1.19.3 (Debian 1.19.3power5) built-in shell (ash)
Enter 'help' for a list of built-in commands.

Nokia-N900:~# dpkg --configure -a
Setting up opera-mobile (11.5beta1-14~fremantle0) ...
chown: /home/user/.opera/application_cache/mcache/vlink4.dat: Stale NFS file handle
chown: /home/user/.opera/cache/revocation/vlink4.dat: Stale NFS file handle
chown: /home/user/.opera/cache/turbo/vlink4.dat: Stale NFS file handle
chown: /home/user/.opera/cache/turbo/g_0065/opr03FS6.tmp: Stale NFS file handle
chown: /home/user/.opera/cache/turbo/g_0065/opr03FSM.tmp: Stale NFS file handle
chown: /home/user/.opera/cache/turbo/g_0065/opr03FSN.tmp: Stale NFS file handle
chown: /home/user/.opera/cache/turbo/g_0065/opr03FS9.tmp: Stale NFS file handle
chown: /home/user/.opera/cache/turbo/g_0065/opr03FSB.tmp: Stale NFS file handle
chown: /home/user/.opera/cache/turbo/g_0065/opr03FSI.tmp: Stale NFS file handle
chown: /home/user/.opera/cache/turbo/g_0065/opr03FSC.tmp: Stale NFS file handle
chown: /home/user/.opera/cache/turbo/g_0065/opr03FSD.tmp: Stale NFS file handle
chown: /home/user/.opera/cache/turbo/g_0065/opr03FSH.tmp: Stale NFS file handle
chown: /home/user/.opera/cache/turbo/g_0065/opr03FSF.tmp: Stale NFS file handle
chown: /home/user/.opera/cache/turbo/g_0065/opr03FS4.tmp: Stale NFS file handle
chown: /home/user/.opera/cache/turbo/g_0065/opr03FSL.tmp: Stale NFS file handle
chown: /home/user/.opera/cache/turbo/g_0065/opr03FSJ.tmp: Stale NFS file handle
dpkg: error processing opera-mobile (--configure):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
opera-mobile
Nokia-N900:~#


the paths that is written after chown . i went to those path. it has broken symlink. i cannot even delete the broken symlink. i even tried purging opera-mobile and reinstalling it.same problem

ibrakalifa 2012-03-12 12:52

Re: Help, package remove error
 
apt-get purge opera-mobile
apt-get install opera-mobile

or try do it thru fapman

Mohammed Muid 2012-03-12 13:18

Re: Help, package remove error
 
i did apt-get purge opera-mobile and also did apt-get install opera-mobile. i faced the same problem.....the strange thing is that when i tried to remove opera-mobile from faster app manager. i couldnt find it in the remove application.
although i have opera-mobile in the menu but its still there in the install application (as if its not been downloaded) in faster app manager.

Mohammed Muid 2012-03-12 17:34

Re: Help, package remove error
 
pls sir. solve my problem :(

michaaa62 2012-03-12 20:34

Re: Help, package remove error
 
Stale NFS handle indicates file system inconsistency or corruption, you should fix it with fsck. Use options -af or even -r to repair this.

Here is a walkthrough for those steps:
Download Gparted-Live-CD.iso file or any Linux-Live-CD image containing gparted application
Burn Gparted-Live-CD to CD or DVD
Install Backupmenu to your N900
Reboot the N900 with keyboard ejected
In Bootmenu type 'w' to export the partitions in read/write-mode
Boot your PC from the Live-CD
If necessary start gparted
Choose the device (hard disk) in the upper right drop down menu should be some 30GB size.
Right click the first partition (approx27GB) and choose 'Resize or Move', use the right handle to shrink the partition.
Click 'Resize'-button (Dont worry you will be asked to apply actions later)
Right click on the second partition (approx.2GB) and choose 'Resize or Move', use the left handle to fill the free space created by the first resizing.
Do not touch the third, aka swap-partition.
Now click apply in the upper toolbar and accept the changes to be applied.
If everything is resized successfully, shut down the PC
On the N900 press 'q' to quit backupmenu and restart Maemo.

And some additional steps to get the same method working in a virtual maschine:
Start VBox, setup the virtual machine, but wait before launching it for the N900.
Shutdown your N900, restart it with keyboard out to have the menu to start BackupMenu.
In BackupMenu hit the 'w' to export the partitions 'read/write'.
In Windows close all the Explorer pop-ups, then configure the USB-rules in VBox. Add the NokiaN900 and every UnknownDevice, if any to your virtual Debian. Start the virtual machine to the desktop.
Now in Windows 'Remove safely' the N900 device through the status bar icon, but do not pull the cable! On your N900 press again 'w' to stop 'read/write'-mode, wait a couple of seconds to again enable 'read/write' with 'w'. Now the virtual machine picks up the USB-devices correctly. Start Gparted on the virtual machine and do what have to be done.

Though it might sound really complex, it may be done in 30 to 40 minutes.

Mohammed Muid 2012-03-13 04:04

Re: Help, package remove error
 
the process is way to complicated. the path that is given in the xterminal window. i.e home/user/.opera/cache. inside this path i have broken symlink which cant be deleted. i flashed my N900 and then installed opera. faced this problem.previously it dint happen. even if i remove opera the path home/user/.opera still exist. isnt there any other way to solve it.or remove the directory along with the broken symlink. i dont want to loose my emmc. it has got many imp documents. i am not in a position to backup 20gb. please help. and thanks for replying. i am not an expert so these steps are preety complicated for me

Mohammed Muid 2012-03-13 15:05

Re: Help, package remove error
 
No solutin yet sir. i am becoming frustrated. i had my cell for 2yrs. i never had this problem. i have opera for a long time :(

omar2100000 2012-05-08 20:52

Re: Help, package remove error
 
Hi all please i want help as fast as can reply . i was try to install android on my N900 but i replied the step apt-get update alot because i found error . and now i cant install any app from app manger i got not enouph space also my memory is empty please help me as fast as can :D
ty

sifo 2012-05-08 22:10

Re: Help, package remove error
 
@omar2100000
it is your /root directory which full i guess run these command in x-terminal df -h /
and see how much available space you got in there. if you dont have enough then type
apt-get clean
apt-get autoclean
apt-get autoremove

hope this help . ;)

./sifo

omar2100000 2012-05-09 00:48

Re: Help, package remove error
 
First writ with rooting my phone ?? and it still not enough space I'm really dont know what is that Please Any help Me.

omar2100000 2012-05-09 00:53

Re: Help, package remove error
 
hey rootfs is 227.8M 227.0M 100%
i want help cause i want install nitdroid :D

michaaa62 2012-05-09 06:09

Re: Help, package remove error
 
You should remove a couple of applications to free some space to get the Phone operational at all.
Also disable some or all of your widgets on your screens.
Disable the extras-testing and extras-devel repositories.
Those three steps should give you some space to install rootsh and apply the code that sifo gave you.

You might try to get some more information by creating a file with debug information and attach that to your posting.
Code:

cd /home/user/MyDocs/.documents
df -h > debug.txt
free >> debug.txt
mount >> debug.txt
du -kx / | sort -n | tail -n50 >> debug.txt

These commands create the file and writes information into the file, you will not see anything on the screen, grab the file in your Documents folder/directory.

Edit: For best results use copy and paste to get the commands to your X-Terminal application, because it might be hard to find '|' a character called pipe, not small L, or '>' on your phone's keyboard.

omar2100000 2012-05-09 12:12

Re: Help, package remove error
 
after i made all steps see that.



BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso30+0m5) built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ $ cd /home/user/MyDocs/.documents
~/MyDocs/.documents $ df -h > debug.txt
~/MyDocs/.documents $ free >> debug.txt
~/MyDocs/.documents $ mount >> debug.txt
~/MyDocs/.documents $ du -kx / | sort -n | tail -n50 >> debug.txt
du: can't open '/and/mnt/obb': Permission denied
du: can't open '/and/mnt/asec': Permission denied
du: can't open '/and/mnt/sdcard': Permission denied
du: can't open '/and/mnt/secure': Permission denied
du: can't open '/and/cache': Permission denied
du: can't open '/and/config': Permission denied
du: can't open '/and/lost+found': Permission denied
du: can't open '/etc/ssl/private': Permission denied
du: can't open '/var/lib/pulse': Permission denied
du: can't open '/root/.pulse': Permission denied
du: can't open '/root/.thumbnails': Permission denied
du: can't open '/root/.config': Permission denied
du: can't open '/root/.gnome2': Permission denied
du: can't open '/root/.cache': Permission denied
~/MyDocs/.documents $

that all please i really want help

sifo 2012-05-09 12:33

Re: Help, package remove error
 
try typing root or sudo gainroot first then do that steps

sifo 2012-05-09 12:38

Re: Help, package remove error
 
visit this page there is good ways to free up some root space

http://talk.maemo.org/showpost.php?p...6&postcount=29

omar2100000 2012-05-09 12:54

Re: Help, package remove error
 
i have 1.53 gb in applocation free

sifo 2012-05-09 13:01

Re: Help, package remove error
 
oh omar you are no getting it that
Quote:

i have 1.53 gb in application free
is 100% different from the root space i suggest you must start reading about your N900 at the link i gave in the previous post contain an attached script use it . it will help you to free enough space

omar2100000 2012-05-09 13:02

Re: Help, package remove error
 
omg.
nothings happen
i want to install some app please help :(

sifo 2012-05-09 13:05

Re: Help, package remove error
 
omar please be clear while posting here what do mean by nothing happened ? what did you used and didn't work ?

omar2100000 2012-05-09 13:26

Re: Help, package remove error
 
i made that steps .
root
cd /home/user/MyDocs/.documents
df -h > debug.txt
free >> debug.txt
mount >> debug.txt
du -kx / | sort -n | tail -n50 >> debug.txt

no thing still not enough space

sifo 2012-05-09 13:42

Re: Help, package remove error
 
for the last time im gonna say this. did tried that script "little program" ;) ?
it will free from 5 to 20 MB

omar2100000 2012-05-09 13:47

Re: Help, package remove error
 
so what i should do ?
i have 1.53 gb application free space and 24GB free in my mobile
what i should do :(

sifo 2012-05-09 13:57

Re: Help, package remove error
 
alright :
1-download the moveroot.sh from here http://talk.maemo.org/showpost.php?p...6&postcount=29
unzip it using any program on PC
2connect your N900 with the PC and put the that (sh) file in your N900 directly
3-unlug USB cable then go to x-terminal and type :
1-root
2-sh /home/user/MyDocs/moveroot.sh
3-wait a little
4-when it is done close x-terminal
5-shut down your phone completely the
6-switch on your N900
7-go to x-terminal the type
df -h /
8-tell me what you got
hope this help.

ibrakalifa 2012-05-09 14:02

Re: Help, package remove error
 
reflash ur device dude, thats will solve ur problem

sifo 2012-05-09 14:05

Re: Help, package remove error
 
@ibrakalifa
you should not tell him " reflash" you should say reinstall your N900 software and format it :p due to the limited understanding that omar got :p
anyway we are here to help ;)

omar2100000 2012-05-09 14:18

Re: Help, package remove error
 
i cant found that page lol :D
help lol

sifo 2012-05-09 14:39

Re: Help, package remove error
 
sorrrrrrrrrrry :o
updated my post click it again ;)


All times are GMT. The time now is 00:35.

vBulletin® Version 3.8.8