Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Apt update error

If none of the specific sub-forums seem right for your thread, ask here.
Message
Author
theworm
Posts: 6
Joined: 2009-05-03 14:08

Re: Apt update error

#16 Post by theworm »

pendrachken wrote:It SEEMS like it is - unless apt-itself is causing the error for some reason:

Code: Select all

Building dependency tree       
Reading state information... Done
The following packages have been kept back:
  gnokii-common
######HERE#### 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.####HERE####
13 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up python-support (1.0.2) ...
Traceback (most recent call last):
  File "/usr/sbin/update-python-modules", line 437, in <module>
    public_packages[package].install(need_postinstall)
  File "/usr/sbin/update-python-modules", line 232, in __getitem__
    self[name] = SharedFileList (path)
  File "/usr/sbin/update-python-modules", line 146, in __init__
    for line in file(path):
IOError: [Errno 21] Is a directory
dpkg: error processing python-support (--configure):
subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python-reportbug:
python-reportbug depends on python-support (>= 0.90.0); however:

Apt WAS saying only gnokii-common is the only package not being upgraded. The goddess only knows what it is saying right now :P after all the depends are whacky now.


P.P.S. It seems as if you where doing either an upgrade or dist-upgrade, is that what was happening when this error started?
I do upgrades pretty often, so it could've been that, but I can't be sure.

I reinstalled 1.0.2 so the dependency problems are gone, but the former problems are there.

I tried apt-get build-dep python-support but it ends with an error: E: Failed to process build dependencies.

As for forcing, I'm not sure what you're saying to force. I have the latest python-support, and it doesn't work. Or do you mean force/pin the previous version, and that will ignore that it's not the right version to meet the packages that depend on it being version 0.90.0 or later?

gnudude
Posts: 1684
Joined: 2009-04-05 17:30
Location: gone....

Re: Apt update error

#17 Post by gnudude »

Use the correct version of python-support for your system. Download the deb file.

use the command
dpkg -i --force-all /path/to/the/file.deb
to slam it in - maybe this solves everything....maybe not

use this command to try and bang it back out cleanly...
dpkg -P --force-all packagename

now use apt or even dpkg to try and install it cleanly without forcing it

then maybe a good
apt-get -f install
to see if everything is kosher

If the error really is in the package then this won't help and it will require a lot more fiddling to work around it.

I actually wonder if something else is wonky on your system.

*Do this at your own risk. It may cause your system to die a unseemly death, hair to grow on your palms, you may go blind....

smallchange
Posts: 1740
Joined: 2009-05-04 15:56
Been thanked: 1 time

Re: Apt update error

#18 Post by smallchange »

The script that is failing is quit simple.

Code: Select all

cat /var/lib/dpkg/info/python-support.postinst
Does /var/lib/python-support exist? Is it a link to /usr/lib/pymodules?

If not what (if anything) is in it and what put it there?

It basically wants to remove that directory and create a link, so look at what is there and make it work, after considering what else is in there.

User avatar
mauser1891
Posts: 85
Joined: 2007-07-22 04:45
Location: Western WA, USA

Re: Apt update error

#19 Post by mauser1891 »

Hello Folks,


Now, I admit that I am still learning alot here.
I was curious as to this route;

aptitude remove <package>
aptitude purge <package>
updatedb
apt-get update
aptitude install <package>

I need to do a little more reading, but wanted to submit this for replies.
This is how I 'switched' from gnome to kde.
Thanks for sharing your knowledge, and response's.
Thank You,
Mauser1891

AMD A6-3400M 8G DDR3 Samsung EVO 120 powered Gateway laptop
FX-8350, 7970, 32G DDR3, 8G RamDisk/SSD/SSHD/HD, Win 8.1 Pro desktop

theworm
Posts: 6
Joined: 2009-05-03 14:08

Re: Apt update error

#20 Post by theworm »

gnudude wrote:Use the correct version of python-support for your system. Download the deb file.

use the command
dpkg -i --force-all /path/to/the/file.deb
to slam it in - maybe this solves everything....maybe not

use this command to try and bang it back out cleanly...
dpkg -P --force-all packagename

now use apt or even dpkg to try and install it cleanly without forcing it

then maybe a good
apt-get -f install
to see if everything is kosher

If the error really is in the package then this won't help and it will require a lot more fiddling to work around it.

I actually wonder if something else is wonky on your system.

*Do this at your own risk. It may cause your system to die a unseemly death, hair to grow on your palms, you may go blind....
No luck unfortunately.
smallchange wrote:The script that is failing is quit simple.

Code: Select all

cat /var/lib/dpkg/info/python-support.postinst
Does /var/lib/python-support exist? Is it a link to /usr/lib/pymodules?

If not what (if anything) is in it and what put it there?

It basically wants to remove that directory and create a link, so look at what is there and make it work, after considering what else is in there.
/var/lib/python-support exists and is a link to /usr/lib/pymodules.

In it, there's a 'python2.5' folder (and nothing else), and in that is a bunch of python things:

Code: Select all

  $ ls -l /var/lib/python-support/python2.5/
total 128
drwxr-xr-x  2 root root 4096 2009-05-06 08:57 atom
drwxr-xr-x  2 root root 4096 2009-05-06 08:57 cairo
drwxr-xr-x  2 root root 4096 2009-05-06 08:57 cameramonitor
drwxr-xr-x  2 root root 4096 2009-05-06 08:57 ccm
lrwxrwxrwx  1 root root   55 2009-05-06 08:57 CDDB-1.4.egg-info -> /usr/share/python-support/python-cddb/CDDB-1.4.egg-info
lrwxrwxrwx  1 root root   45 2009-05-06 08:57 CDDB.py -> /usr/share/python-support/python-cddb/CDDB.py
lrwxrwxrwx  1 root root   54 2009-05-06 08:57 cdrom.so -> /usr/lib/python-support/python-cddb/python2.5/cdrom.so
lrwxrwxrwx  1 root root   55 2009-05-06 08:57 cups-1.0.egg-info -> /usr/share/python-support/python-cups/cups-1.0.egg-info
lrwxrwxrwx  1 root root   53 2009-05-06 08:57 cups.so -> /usr/lib/python-support/python-cups/python2.5/cups.so
drwxr-xr-x  2 root root 4096 2009-05-06 08:57 cupsutils
drwxr-xr-x  3 root root 4096 2009-05-06 08:57 dbus
lrwxrwxrwx  1 root root   54 2009-05-06 08:57 dbus_bindings.py -> /usr/share/python-support/python-dbus/dbus_bindings.py
lrwxrwxrwx  1 root root   63 2009-05-06 08:57 _dbus_bindings.so -> /usr/lib/python-support/python-dbus/python2.5/_dbus_bindings.so
lrwxrwxrwx  1 root root   68 2009-05-06 08:57 _dbus_glib_bindings.so -> /usr/lib/python-support/python-dbus/python2.5/_dbus_glib_bindings.so
drwxr-xr-x  7 root root 4096 2009-05-06 08:57 deskbar
lrwxrwxrwx  1 root root   47 2009-05-06 08:57 DiscID.py -> /usr/share/python-support/python-cddb/DiscID.py
drwxr-xr-x  3 root root 4096 2009-05-06 08:57 DiskManager
drwxr-xr-x  2 root root 4096 2009-05-06 08:57 DistUpgrade
lrwxrwxrwx  1 root root   55 2009-05-06 08:57 drv_libxml2.py -> /usr/share/python-support/python-libxml2/drv_libxml2.py
lrwxrwxrwx  1 root root   43 2009-05-06 08:57 feedparser-4.1.egg-info -> /usr/share/pyshared/feedparser-4.1.egg-info
lrwxrwxrwx  1 root root   33 2009-05-06 08:57 feedparser.py -> /usr/share/pyshared/feedparser.py
drwxr-xr-x 15 root root 4096 2009-05-06 08:57 gdata
lrwxrwxrwx  1 root root   62 2009-05-06 08:57 gdata.py-1.1.1.egg-info -> /usr/share/python-support/python-gdata/gdata.py-1.1.1.egg-info
drwxr-xr-x  2 root root 4096 2009-05-06 08:57 GMenuSimpleEditor
lrwxrwxrwx  1 root root   55 2009-05-06 08:57 gmenu.so -> /usr/lib/python-support/python-gmenu/python2.5/gmenu.so
lrwxrwxrwx  1 root root   65 2009-05-06 08:57 GnuPGInterface.py -> /usr/share/python-support/python-gnupginterface/GnuPGInterface.py
drwxr-xr-x 12 root root 4096 2009-05-06 08:57 gtk-2.0
lrwxrwxrwx  1 root root   73 2009-05-06 08:57 gtksourceview2.so -> /usr/lib/python-support/python-gtksourceview2/python2.5/gtksourceview2.so
drwxr-xr-x  2 root root 4096 2009-05-06 08:57 invest
lrwxrwxrwx  1 root root   62 2009-05-06 08:57 libxml2mod.so -> /usr/lib/python-support/python-libxml2/python2.5/libxml2mod.so
lrwxrwxrwx  1 root root   51 2009-05-06 08:57 libxml2.py -> /usr/share/python-support/python-libxml2/libxml2.py
lrwxrwxrwx  1 root root   52 2009-05-06 08:57 lsb_release.py -> /usr/share/python-support/lsb-release/lsb_release.py
lrwxrwxrwx  1 root root   57 2009-05-06 08:57 mmkeys.so -> /usr/lib/python-support/python-mmkeys/python2.5/mmkeys.so
drwxr-xr-x  2 root root 4096 2009-05-06 08:57 ogg
lrwxrwxrwx  1 root root   57 2009-05-06 08:57 ORBit.so -> /usr/lib/python-support/python-pyorbit/python2.5/ORBit.so
lrwxrwxrwx  1 root root   38 2009-05-06 08:57 pyogg-1.3.egg-info -> /usr/share/pyshared/pyogg-1.3.egg-info
drwxr-xr-x  5 root root 4096 2009-05-06 08:57 PythonCard
drwxr-xr-x  3 root root 4096 2009-05-06 08:57 reportbug
drwxr-xr-x  2 root root 4096 2009-05-06 08:57 reportbug-4.1.egg-info
drwxr-xr-x  4 root root 4096 2009-05-06 08:57 sabayon
drwxr-xr-x  2 root root 4096 2009-05-06 08:57 selinux
lrwxrwxrwx  1 root root   53 2009-05-06 08:57 semanage.py -> /usr/share/python-support/python-semanage/semanage.py
lrwxrwxrwx  1 root root   62 2009-05-06 08:57 _semanage.so -> /usr/lib/python-support/python-semanage/python2.5/_semanage.so
lrwxrwxrwx  1 root root   53 2009-05-06 08:57 seobject.py -> /usr/share/python-support/policycoreutils/seobject.py
drwxr-xr-x  2 root root 4096 2009-05-06 08:57 sepolgen
drwxr-xr-x  3 root root 4096 2009-05-06 08:57 softwareproperties
drwxr-xr-x  2 root root 4096 2009-05-06 08:57 tidy
drwxr-xr-x  4 root root 4096 2009-05-06 08:57 UpdateManager
lrwxrwxrwx  1 root root   63 2009-05-06 08:57 uTidylib-0.2.egg-info -> /usr/share/python-support/python-utidylib/uTidylib-0.2.egg-info
drwxr-xr-x  2 root root 4096 2009-05-06 08:57 xdg
I tried a bunch of things:
1. deleted /usr/lib/pymodules and tried aptitude upgrade (it tries to reconfigure it each time I upgrade, so I figured this would produce the least unwanted side effects)
2. deleted /usr/lib/pymodules and tried aptitude reinstall python-support
3. deleted /usr/lib/pymodules and /var/lib/python-support and did as in 1 and 2
4. deleted /usr/lib/pymodules/python2.5 and did as in 1 and 2
5. deleted /usr/lib/pymodules and /var/lib/python-support and did as in 1 and 2

all without it fixing. Each time it remakes them when it installs the package, so it's creating then failing to delete them while installing, so it seems like the package itself and not my system.

Here's my /var/lib/dpkg/info/python-support.postinst:

Code: Select all

  $ cat /var/lib/dpkg/info/python-support.postinst
#! /bin/sh
set -e

if [ "$1" = "triggered" ]; then
    update-python-modules --post-install
    exit 0
fi

# Remove the old directory.
if [ "$1" = configure ] && dpkg --compare-versions "$2" lt-nl 0.90; then
    rm -rf /var/lib/python-support
fi

if ! [ -e /var/lib/python-support ]; then
    ln -sf /usr/lib/pymodules /var/lib/python-support
fi



update-python-modules --post-install python-support.private
I tried calling

Code: Select all

sudo update-python-modules --post-install
from the command line, and it comes up with the same error as aptitude.

I also tried editing /var/lib/dpkg/info/python-support.postinst, specifically the line that tries to delete the file:

Code: Select all

rm -rf /var/lib/python-support
I changed to

Code: Select all

rmdir --ignore-fail-on-non-empty /var/lib/python-support
but it came up with an error saying "Setting up python-support (1.0.2) ... rmdir: failed to remove `/var/lib/python-support': Not a directory", which it isn't, but then why does the original error say "IOError: [Errno 21] Is a directory" with rm instead of rmdir there? I tried commenting out the whole 'if' part that tries to remove the directory, and it comes up with 'IOError: [Errno 21] Is a directory' again, so I think it's update-python-modules and not the rest of /var/lib/dpkg/info/python-support.postinst causing the problem, which brings us back to /usr/sbin/update-python-modules as the cause (assuming I'm right about all this).

gnudude
Posts: 1684
Joined: 2009-04-05 17:30
Location: gone....

Re: Apt update error

#21 Post by gnudude »

keep beating it with the hammer....

Sounds like maybe some packages changed and now you have a old package doing one thing, while a newer package expects something else....or vice versa....like maybe you missed a update or two...

*please be aware I would never do this to my system but I love a good show

I guess we will have to let the gurus figure it out...

pendrachken
Posts: 1394
Joined: 2007-03-04 21:10
Location: U.S.A. - WI.

Re: Apt update error

#22 Post by pendrachken »

That script looks funny.

Try deleting /var/lib/python-support with rm -rf then symlinking /usr/lib/pymodules there manually WITHOUT the -f option

Code: Select all

ln -s /usr/lib/pymodules  /var/lib/python-support
then try running that update-python-modules --post-install by hand again once


also you could try to look in /usr/lib/ to see if the symlink works

Code: Select all

ls -lah /usr/lib | grep pymod 
That should say "pymodules -> /var/lib/python-support" or something close to that
fortune -o
Your love life will be... interesting.
:twisted: How did it know?

The U.S. uses the metric system too, we have tenths, hundredths and thousandths of inches :-P

smallchange
Posts: 1740
Joined: 2009-05-04 15:56
Been thanked: 1 time

Re: Apt update error

#23 Post by smallchange »

Looking at update-python-modules it seems you can run it with -vpa and get output that should tell you which package is failing to byte compile. You could then decide to temporarily remove that package or not, as you need.

didi
Posts: 901
Joined: 2007-12-04 16:26
Location: the Netherlands

Re: Apt update error

#24 Post by didi »

mauser1891 wrote:aptitude remove <package>
aptitude purge <package>
updatedb
apt-get update
aptitude install <package>
How about aptitude update instead of apt-get update.

You may want to choose 1 package manager and use that consistantly ;)

Post Reply