Apt update error

If none of the more specific forums is the right place to ask

Apt update error

Postby theworm » 2009-05-03 14:15

Hi :)

First off, I am using Squeeze.

After updating recently, something happened with a package call (from python-support) to update-python-modules that didn't work, and now a bunch of packages are only half installed from unmet dependencies due to the unconfigured packages. I'm afraid the fix is beyond my knowledge, and google gives a bunch of closed bug reports with no solution. Here is what apt-get upgrade looks like now:

Code: Select all
  $ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have been kept back:
  gnokii-common
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
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:
  Package python-support is not configured yet.
dpkg: error processing python-reportbug (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of reportbug:
 reportbug depends on python-reportbug; however:
  Package python-reportbug is not configured yet.
dpkg: error processing reportbug (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-gtk2:
 python-gtk2 depends on python-support (>= 0.90.0); however:
  Package python-support is not configured yet.
dpkg: error processing python-gtk2 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-glade2:
 python-glade2 depends on python-support (>= 0.90.0); however:
  Package python-support is not configured yet.
 python-glade2 depends on python-gtk2 (= 2.14.1-2); however:
  Package python-gtk2 is not configured yet.
dpkg: error processing python-glade2 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-mmkeys:
 python-mmkeys depends on python-support (>= 0.7.1); however:
  Package python-support is not configured yet.
 python-mmkeys depends on python-gtk2; however:
  Package python-gtk2 is not configured yet.
dpkg: error processing python-mmkeys (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-feedparser:
 python-feedparser depends on python-support (>= 0.90.0); however:
  Package python-support is not configured yet.
dpkg: error processing python-feedparser (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of exaile:
 exaile depends on python-support (>= 0.7.1); however:
  Package python-support is not configured yet.
 exaile depends on python-gtk2; however:
  Package python-gtk2 is not configured yet.
 exaile depends on python-glade2; however:
  Package python-glade2 is not configured yet.
 exaile depends on python-mmkeys; however:
  Package python-mmkeys is not configured yet.
 exaile depends on python-feedparser; however:
  Package python-feedparser is not configured yet.
dpkg: error processing exaile (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of system-config-printer:
 system-config-printer depends on python-support (>= 0.7.1); however:
  Package python-support is not configured yet.
 system-config-printer depends on python-gtk2; however:
  Package python-gtk2 is not configured yet.
 system-config-printer depends on python-glade2; however:
  Package python-glade2 is not configured yet.
dpkg: error processing system-config-printer (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of serpentine:
 serpentine depends on python-glade2 (>= 2.8.6-5); however:
  Package python-glade2 is not configured yet.
dpkg: error processing serpentine (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gnome:
 gnome depends on system-config-printer (>= 1.0.0); however:
  Package system-config-printer is not configured yet.
 gnome depends on serpentine; however:
  Package serpentine is not configured yet.
dpkg: error processing gnome (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-ogg:
 python-ogg depends on python-support (>= 0.90.0); however:
  Package python-support is not configured yet.
dpkg: error processing python-ogg (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of compizconfig-settings-manager:
 compizconfig-settings-manager depends on python-support (>= 0.90.0); however:
  Package python-support is not configured yet.
 compizconfig-settings-manager depends on python-gtk2; however:
  Package python-gtk2 is not configured yet.
dpkg: error processing compizconfig-settings-manager (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python-support
 python-reportbug
 reportbug
 python-gtk2
 python-glade2
 python-mmkeys
 python-feedparser
 exaile
 system-config-printer
 serpentine
 gnome
 python-ogg
 compizconfig-settings-manager
E: Sub-process /usr/bin/dpkg returned an error code (1)


Please let me know if any other information will help with the problem. And thank you very much for your help.
theworm
 
Posts: 6
Joined: 2009-05-03 14:08

Re: Apt update error

Postby BioTube » 2009-05-03 14:26

I had a similar problem a while back, but it didn't bother me much(it only held up python-support - it looks like you use Python much more than me). However, it fixed itself on my system; have you tried uninstalling and reinstalling the package?
Image
Ludwig von Mises wrote:The elite should be supreme by virtue of persuasion, not by the assistance of firing squads.
User avatar
BioTube
 
Posts: 7551
Joined: 2007-06-01 04:34

Re: Apt update error

Postby theworm » 2009-05-03 15:00

BioTube wrote:I had a similar problem a while back, but it didn't bother me much(it only held up python-support - it looks like you use Python much more than me). However, it fixed itself on my system; have you tried uninstalling and reinstalling the package?

I'm not sure exactly how long it's been, maybe a week, but yes, I've tried uninstalling it (using --purge too), despite the many packages relying on it, after which I reinstalled the rest, but that just added more unconfigured package errors (there are a lot more than there had been at first):

Code: Select all
  $ sudo apt-get remove python-support
[sudo] password for zxcv:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  bluez-gnome gnome-network-admin gnome-power-manager ekiga gedit-common gcalctool python-ldap libpt-1.10.10-plugins-v4l gnome-backgrounds libunique-1.0-0 libpt-1.10.10-plugins-alsa libgtk-vnc-1.0-0
  python-4suite-xml gtk2-engines gnome-volume-manager untex gucharmap zenity cheese pythoncard-doc libunac1 gnome-themes-extras evolution-exchange transmission-gtk seahorse vinagre wv libmrss0 libgalago3
  libtracker-gtk0 gnome-nettool transmission-common libdatrie0 libx264-66 gconf-editor libdmx1 libcryptui0 libqdbm14 libgdl-1-common gdm-themes arj gnome-system-tools libepc-ui-1.0-1 eog gdm
  libgtksourceview1.0-0 gnome-vfs-obexftp libavahi-ui0 gnome-spell libopenobex1 libspeexdsp1 sound-juicer vino libpt-1.10.10 gstreamer0.10-gnomevfs libopal-2.2 libepc-1.0-1 libgnomevfs2-bin dmz-cursor-theme
  gtk2-engines-pixbuf gnome-screensaver python-gdbm libgtksourceview2.0-0 gstreamer0.10-tools totem-gstreamer odt2txt xnest libcupsys2 libgtksourceview-common totem-mozilla gnome-themes libnxml0 totem-common
  swfdec-gnome libgdl-1-0 file-roller libgtkhtml2-0 libgtksourceview2.0-common
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  alacarte alarm-clock cameramonitor compizconfig-settings-manager deskbar-applet devhelp devhelp-common disk-manager epiphany-extensions exaile fast-user-switch-applet flashplayer-mozilla fusion-icon gdebi
  gdebi-core gedit getlibs gimp gnome gnome-about gnome-app-install gnome-applets gnome-applets-data gnome-control-center gnome-core gnome-desktop-environment gnome-doc-utils gnome-games gnome-games-data
  gnome-main-menu gnome-menus gnome-office gnome-panel gnome-session gnome-user-guide hal-cups-utils ia32-libs ia32-libs-gtk ia32-libs-libcurl3 ia32-libs-libidn11 ia32-libs-libnspr4 ia32-libs-libnss3
  ia32-libs-libssh2 libdevhelp-1-0 libpurple-bin libwine libwine-alsa libwine-cms libwine-gl libwine-gphoto2 libwine-ldap libwine-print libwine-sane lsb-release nautilus nautilus-cd-burner nspluginwrapper
  policycoreutils python-apt python-bugbuddy python-cairo python-cddb python-cups python-cupsutils python-dbus python-eggtrayicon python-elementtree python-evolution python-feedparser python-gamin
  python-gconf python-gdata python-glade2 python-gmenu python-gnome2 python-gnome2-desktop python-gnome2-extras python-gnomeapplet python-gnomedesktop python-gnomekeyring python-gnomeprint
  python-gnupginterface python-gobject python-gpod python-gst0.10 python-gtk2 python-gtkhtml2 python-gtkmozembed python-gtksourceview python-gtksourceview2 python-gtkspell python-gtop python-libxml2
  python-mediaprofiles python-metacity python-mmkeys python-nautilusburn python-notify python-ogg python-pyogg python-pyorbit python-pythoncard python-pyvorbis python-reportbug python-rsvg python-selinux
  python-semanage python-sepolgen python-sexy python-software-properties python-support python-totem-plparser python-utidylib python-vte python-wnck python-xdg pythoncard pythoncard-tools reportbug rhythmbox
  sabayon selinux-policy-default serpentine skype software-properties-gtk system-config-printer totem-plugins unattended-upgrades update-manager update-manager-core update-notifier wine wine-bin wine-utils
  yelp
0 upgraded, 0 newly installed, 135 to remove and 1 not upgraded.
13 not fully installed or removed.
After this operation, 450MB disk space will be freed.
Do you want to continue [Y/n]?
theworm
 
Posts: 6
Joined: 2009-05-03 14:08

Re: Apt update error

Postby pendrachken » 2009-05-04 04:35

try to apt-get update then apt-get -f install and see if a newer version has made it to the repo servers for the bugfixes.
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
pendrachken
 
Posts: 1049
Joined: 2007-03-04 21:10
Location: U.S.A. - WI.

Re: Apt update error

Postby theworm » 2009-05-05 20:13

No luck with apt-get -f unfortunately.

A friend said it seems like if I could fix this part of the error, it'd be set:
Code: Select all
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


So let's see, lines 146, 232, and 437 of /usr/sbin/update-python-modules seem to be the problems.

146 (I put a comment in where it is exactly but I've included the whole code block):
Code: Select all
# Abstract class for PrivateFileList and SharedFileList
class _FileList(list):
    def __init__ (self, path):
        self.name = path
        for line in file(path): #line 146
            line = line.strip()
            if (not line) or line.startswith('#'):
                continue
            if line.startswith('/'):
                self.append(line)
                continue
            line = [x.strip() for x in line.split('=',1)]
            if len(line) != 2:
                warning("Parse error in %s"%path)
                continue
            self.parse_option(*line)

# This class represents a file list as provided in the /usr/share/python-support/$package.public
# Useful for public modules and extensions
class SharedFileList(_FileList, _PublicList):
    def parse_option (self, arg, value):
        if arg=='pyversions':
            self.pyversions = pysupport.version_list(value)
        # Ignore unknown arguments for extensivity

# This class represents a file list as provided in the /usr/share/python-support/$package.private
# Useful for private modules
class PrivateFileList(_FileList, _PrivateList):
    def parse_option (self, arg, value):
        if arg=='pyversion':
            self.pyversion = value


232:
Code: Select all
class CachedFileList(dict):
    def __getitem__ (self, name):
        if name in self and dict.__getitem__(self, name) == None:
            if name.startswith("/"):
                # The case of old-style private directories
                self[name] = PrivateDirList (name)
            else:
                path = os.path.join (sourcepath, name)
                if name.endswith(".public"):
                    self[name] = SharedFileList (path) #line 232
                elif name.endswith(".private"):
                    self[name] = PrivateFileList (path)
                elif os.path.isdir(path):
                    self[name] = SharedDirList (path)
                else:
                    raise "[Internal Error] I don't know what to do with this path: %s"%path
        return dict.__getitem__(self, name)


and finally 437:
Code: Select all
# Check for changes in installed python versions
need_postinstall = []
for pyver in py_oldversions+py_supported:
    dir = os.path.join(basepath,pyver)
    # Check for ".path" because sometimes the directory already exists
    # while the python version isn't installed, because of some .so's.
    if pyver not in py_installed and os.path.isdir(dir):
        debug("Removing obsolete directory %s..."%(dir))
        shutil.rmtree(dir)
    if pyver in py_installed and not os.path.isfile(os.path.join(dir,".path")):
        need_postinstall.append(pyver)
if need_postinstall:
    debug("Building all modules for %s..."%(" ".join(need_postinstall)))
    for package in public_packages:
        public_packages[package].install(need_postinstall) #line 437
    for pyver in need_postinstall:
        # Here we need to launch create_dotpath because otherwise we could
        # end up without the .path file that is checked 6 lines earlier
        create_dotpath(pyver)


The first two both fail because of the 'path' variable, but line 437 doesn't. I'm afraid I don't know enough to understand the problem.
theworm
 
Posts: 6
Joined: 2009-05-03 14:08

Re: Apt update error

Postby gnudude » 2009-05-05 20:19

aptitude update
aptitude reinstall python-support

if necessary download python-support deb and install it with dpkg, force it if necessary...
gnudude
 
Posts: 1712
Joined: 2009-04-05 17:30
Location: gone....

Re: Apt update error

Postby pendrachken » 2009-05-05 20:41

aptitude update
aptitude reinstall python-support

if necessary download python-support deb and install it with dpkg, force it if necessary..


The second part is NOT a good idea. While it MIGHT work for now, later down the road you might run into "dependence hell" just like on the old RPM systems before YUM and friends.

A better Idea is to google apt-pinning ( debian wiki has a good article) and pull just pull python and friends from Sid ( probably where the bugfix updated .Deb is anyways)
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
pendrachken
 
Posts: 1049
Joined: 2007-03-04 21:10
Location: U.S.A. - WI.

Re: Apt update error

Postby gnudude » 2009-05-05 21:03

pendrachken wrote:The second part is NOT a good idea. While it MIGHT work for now, later down the road you might run into "dependence hell" just like on the old RPM systems before YUM and friends.


Uh, I was talking about using dpkg to install the same package that apt/aptitude is trying to install. Forcing it is never a good idea....but in this case, it isn't a bad idea either. If forcing it can get it popped in, then that should either fix it or allow him to cleanly un-install it which would be preferable to having it b0rk3d somewhere in the middle. Nobody talked about mixing anything...
gnudude
 
Posts: 1712
Joined: 2009-04-05 17:30
Location: gone....

Re: Apt update error

Postby pendrachken » 2009-05-05 22:35

gnudude wrote:
pendrachken wrote:The second part is NOT a good idea. While it MIGHT work for now, later down the road you might run into "dependence hell" just like on the old RPM systems before YUM and friends.


Uh, I was talking about using dpkg to install the same package that apt/aptitude is trying to install. Forcing it is never a good idea....but in this case, it isn't a bad idea either. If forcing it can get it popped in, then that should either fix it or allow him to cleanly un-install it which would be preferable to having it b0rk3d somewhere in the middle. Nobody talked about mixing anything...


I still say forcing the package is never the way to go, you won't get all the install scripts run to set up the package. Even if apt / dpkg see the file as installed, when you try to remove it scripts for removing its files will error out as well ( not to mention if it IS removed you may have old files left over polluting the next install of the package). What I personally would do is this: move the /usr/sbin/update-python-modules to a backup file ( like /usr/sbin/1update-python-modules ) and try to re-install python-support.

If that doesn't work I still suggest pulling in the packages from Sid, after setting up apt-pinning. Forcing the install is like smashing a watermelon with a 10 pound hammer and then wondering why it's all in little pieces....
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
pendrachken
 
Posts: 1049
Joined: 2007-03-04 21:10
Location: U.S.A. - WI.

Re: Apt update error

Postby theworm » 2009-05-05 22:40

gnudude wrote:aptitude update
aptitude reinstall python-support

if necessary download python-support deb and install it with dpkg, force it if necessary...


No luck with the first two, so I went to packages.debian.org, grabbed the previous version (I have 1.0.2, which is for testing and experimental, while 0.8.4 is the latest for stable) and installed it, but indeed I ran into dependency problems:
Code: Select all
  $ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run `apt-get -f install' to correct these.
The following packages have unmet dependencies:
  compizconfig-settings-manager: Depends: python-support (>= 0.90.0) but 0.8.4 is installed
  python-feedparser: Depends: python-support (>= 0.90.0) but 0.8.4 is installed
  python-glade2: Depends: python-support (>= 0.90.0) but 0.8.4 is installed
  python-gtk2: Depends: python-support (>= 0.90.0) but 0.8.4 is installed
  python-ogg: Depends: python-support (>= 0.90.0) but 0.8.4 is installed
  python-reportbug: Depends: python-support (>= 0.90.0) but 0.8.4 is installed
E: Unmet dependencies. Try using -f.


I tried finding version 0.90.0 to see if that would be acceptable but couldn't.

However, I noticed even this version came with a similar error:
Code: Select all
  $ sudo dpkg -i python-support_0.8.4_all.deb
(Reading database ... 206327 files and directories currently installed.)
Preparing to replace python-support 1.0.2 (using python-support_0.8.4_all.deb) ...
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
Unpacking replacement python-support ...
dpkg: warning - unable to delete old directory `/usr/lib/pymodules': Directory not empty
Setting up python-support (0.8.4) ...
Processing triggers for man-db ...


but it's a bit more helpful: the problem is with /usr/lib/pymodules it seems. I tried deleting it and running sudo aptitude reinstall python-support to see if the error changed at least, and it doesn't, and also, it remakes the directory.





pendrachken wrote:
gnudude wrote:
pendrachken wrote:The second part is NOT a good idea. While it MIGHT work for now, later down the road you might run into "dependence hell" just like on the old RPM systems before YUM and friends.


Uh, I was talking about using dpkg to install the same package that apt/aptitude is trying to install. Forcing it is never a good idea....but in this case, it isn't a bad idea either. If forcing it can get it popped in, then that should either fix it or allow him to cleanly un-install it which would be preferable to having it b0rk3d somewhere in the middle. Nobody talked about mixing anything...


I still say forcing the package is never the way to go, you won't get all the install scripts run to set up the package. Even if apt / dpkg see the file as installed, when you try to remove it scripts for removing its files will error out as well ( not to mention if it IS removed you may have old files left over polluting the next install of the package). What I personally would do is this: move the /usr/sbin/update-python-modules to a backup file ( like /usr/sbin/1update-python-modules ) and try to re-install python-support.

If that doesn't work I still suggest pulling in the packages from Sid, after setting up apt-pinning. Forcing the install is like smashing a watermelon with a 10 pound hammer and then wondering why it's all in little pieces....

As for backing up and removing update-python-modules, unfortunately that was one of the first things I tried. And the unstable version is what I had originally (and have again), since I'm on Squeeze.
theworm
 
Posts: 6
Joined: 2009-05-03 14:08

Re: Apt update error

Postby gnudude » 2009-05-05 23:24

pendrachken wrote:I still say forcing the package is never the way to go
the means to an end my friend....means to and end...

you won't get all the install scripts run to set up the package

What? I wonder what we did before we had apt???

Even if apt / dpkg see the file as installed, when you try to remove it scripts for removing its files will error out as well ( not to mention if it IS removed you may have old files left over polluting the next install of the package).

What?

Forcing the install is like smashing a watermelon with a 10 pound hammer and then wondering why it's all in little pieces....

No it is like smashing a big peg in a small hole in order to use the big removal hammer to cleanly smash the big peg back out of the small hole...
gnudude
 
Posts: 1712
Joined: 2009-04-05 17:30
Location: gone....

Re: Apt update error

Postby pendrachken » 2009-05-05 23:29

well, if you want to force it is up to you, but you might want to try to testings for your depends issue


I still don't like forcing, you could try apt-get build-dep python-support && apt-get source -b python-support
just to see if a localized build will work better.
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
pendrachken
 
Posts: 1049
Joined: 2007-03-04 21:10
Location: U.S.A. - WI.

Re: Apt update error

Postby gnudude » 2009-05-05 23:33

I also wonder if the system is fully up to date? possibly some package mis-match has caused the problem?
gnudude
 
Posts: 1712
Joined: 2009-04-05 17:30
Location: gone....

Re: Apt update error

Postby pendrachken » 2009-05-05 23:44

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?
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
pendrachken
 
Posts: 1049
Joined: 2007-03-04 21:10
Location: U.S.A. - WI.

Re: Apt update error

Postby gnudude » 2009-05-06 00:18

Well any dependency issues cause by installing a mis-matched deb is easily fixed.

I wonder why gnokii was held back.
gnudude
 
Posts: 1712
Joined: 2009-04-05 17:30
Location: gone....

Next

Return to General Questions

Who is online

Users browsing this forum: No registered users and 14 guests

fashionable