Gentoo LInux emerge --sync problems

I'm trying to sync my Gentoo emerge database, with emerge --sync,
which returns this:

catch22bbs / # emerge --sync
>>> Syncing repository 'gentoo' into '/usr/portage'...
>>> Starting rsync with rsync://144.76.13.132/gentoo-portage...
>>> Checking server timestamp ...
Welcome To
        ____ _____ _____    _    _     _____ ____               _
       / ___|_   _| ____|  / \  | |   | ____|  _ \   _ __   ___| |_
       \___ \ | | |  _|   / _ \ | |   |  _| | |_) | | '_ \ / _ \ __|
        ___) || | | |___ / ___ \| |___| |___|  _ < _| | | |  __/ |_
       |____/ |_| |_____/_/   \_\_____|_____|_| \_(_)_| |_|\___|\__|

IP: 144.76.13.132
AKA: rsync7.de.gentoo.org
AKA: rsync.gentoo.stealer.net

Connection: 1 GBit/s, rsync limited to 20 connections
Location: Germany
Contact: Sven Wegener <swegener@gentoo.org>

receiving incremental file list
rsync: mkstemp "/var/tmp/.tmp0utrru63.rfV9zq" failed: Permission denied (13)

Number of files: 1 (reg: 1)
Number of created files: 0
Number of deleted files: 0
Number of regular files transferred: 1
Total file size: 32 bytes
Total transferred file size: 32 bytes
Literal data: 32 bytes
Matched data: 0 bytes
File list size: 41
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 104
Total bytes received: 127

sent 104 bytes  received 127 bytes  92.40 bytes/sec
total size is 32  speedup is 0.14
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1659) [generator=3.1.3]
>>> Retrying...


>>> Starting retry 1 of 13 with rsync://157.90.210.195/gentoo-portage
>>> Checking server timestamp ...
rsync: failed to connect to 157.90.210.195 (157.90.210.195): Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(127) [Receiver=3.1.3]
>>> Retrying...


>>> Starting retry 2 of 13 with rsync://134.147.220.229/gentoo-portage
>>> Checking server timestamp ...
receiving incremental file list
rsync: mkstemp "/var/tmp/.tmp1cwal8rh.lEyu58" failed: Permission denied (13)

Number of files: 1 (reg: 1)
Number of created files: 0
Number of deleted files: 0
Number of regular files transferred: 1
Total file size: 32 bytes
Total transferred file size: 32 bytes
Literal data: 32 bytes
Matched data: 0 bytes
File list size: 41
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 104
Total bytes received: 127

sent 104 bytes  received 127 bytes  66.00 bytes/sec
total size is 32  speedup is 0.14
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1659) [generator=3.1.3]
>>> Retrying...


>>> Starting retry 3 of 13 with rsync://46.101.221.22/gentoo-portage
>>> Checking server timestamp ...
rsync8.de.gentoo.org

  IPv4:    46.101.221.22
  IPv6:    2a03:b0c0:3:d0::c3:f001 
  Contact: rsync@moonitor.org

receiving incremental file list
rsync: mkstemp "/var/tmp/.tmpjfppbqkc.bKwlgS" failed: Permission denied (13)

Number of files: 1 (reg: 1)
Number of created files: 0
Number of deleted files: 0
Number of regular files transferred: 1
Total file size: 32 bytes
Total transferred file size: 32 bytes
Literal data: 32 bytes
Matched data: 0 bytes
File list size: 41
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 104
Total bytes received: 127

sent 104 bytes  received 127 bytes  42.00 bytes/sec
total size is 32  speedup is 0.14
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1659) [generator=3.1.3]
>>> Retrying...


>>> Starting retry 4 of 13 with rsync://88.198.69.178/gentoo-portage
>>> Checking server timestamp ...



This Gentoo Linux Portage tree mirror is provided by amiconsult GmbH in Karlsruhe, Germany.
Please direct any questions regarding this system to Timo Rothweiler <tr.bgo@gmx.de>.

System data:

Link speed:      100 MBit/s (full duplex)
CPU:             Intel Core i7 920
RAM:             8 GiB
Max Connections: 50
IP:              88.198.69.178
Location:        Nuremberg, Germany




receiving incremental file list
rsync: mkstemp "/var/tmp/.tmpsmdql0ag.nsr6hR" failed: Permission denied (13)

Number of files: 1 (reg: 1)
Number of created files: 0
Number of deleted files: 0
Number of regular files transferred: 1
Total file size: 32 bytes
Total transferred file size: 32 bytes
Literal data: 32 bytes
Matched data: 0 bytes
File list size: 41
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 104
Total bytes received: 127

sent 104 bytes  received 127 bytes  66.00 bytes/sec
total size is 32  speedup is 0.14
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1659) [generator=3.1.3]
>>> Retrying...


>>> Starting retry 5 of 13 with rsync://89.238.64.78/gentoo-portage
>>> Checking server timestamp ...

@ERROR: invalid uid nobody
rsync error: error starting client-server protocol (code 5) at main.c(1657) [Receiver=3.1.3]
>>> Retrying...


>>> Starting retry 6 of 13 with rsync://129.143.116.10/gentoo-portage
>>> Checking server timestamp ...
Welcome to the ftp-stud.hs-esslingen.de archives.

If have any unusual problems, please report them via e-mail to
rsync@ftp-stud.hs-esslingen.de.

  All transfers are logged.
  If you don't like this policy, then disconnect now.
  This server does not support --checksum (-c)
  This server does not support --compress (-z)


receiving incremental file list
rsync: mkstemp "/var/tmp/.tmphzbjhffc.9DVc4d" failed: Permission denied (13)

Number of files: 1 (reg: 1)
Number of created files: 0
Number of deleted files: 0
Number of regular files transferred: 1
Total file size: 32 bytes
Total transferred file size: 32 bytes
Literal data: 32 bytes
Matched data: 0 bytes
File list size: 41
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 104
Total bytes received: 132

sent 104 bytes  received 132 bytes  94.40 bytes/sec
total size is 32  speedup is 0.14
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1659) [generator=3.1.3]
>>> Retrying...


>>> Starting retry 7 of 13 with rsync://137.226.34.46/gentoo-portage
>>> Checking server timestamp ...
--------------------------------------------------------------
The features compression (-z) and checksums (-c) are disabled.

More information about this server is available via HTTPs:
https://ftp.halifax.rwth-aachen.de/
--------------------------------------------------------------

receiving incremental file list
rsync: mkstemp "/var/tmp/.tmpchml2puv.eOZzod" failed: Permission denied (13)

Number of files: 1 (reg: 1)
Number of created files: 0
Number of deleted files: 0
Number of regular files transferred: 1
Total file size: 32 bytes
Total transferred file size: 32 bytes
Literal data: 32 bytes
Matched data: 0 bytes
File list size: 41
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 104
Total bytes received: 132

sent 104 bytes  received 132 bytes  67.43 bytes/sec
total size is 32  speedup is 0.14
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1659) [generator=3.1.3]
>>> Retrying...


>>> Starting retry 8 of 13 with rsync://[2a01:4f8:252:1806::2]/gentoo-portage
>>> Checking server timestamp ...
rsync: failed to connect to 2a01:4f8:252:1806::2 (2a01:4f8:252:1806::2): Cannot assign requested address (99)
rsync error: error in socket IO (code 10) at clientserver.c(127) [Receiver=3.1.3]
>>> Retrying...


>>> Starting retry 9 of 13 with rsync://[2a00:1828:2000:128::10]/gentoo-portage
>>> Checking server timestamp ...
rsync: failed to connect to 2a00:1828:2000:128::10 (2a00:1828:2000:128::10): Cannot assign requested address (99)
rsync error: error in socket IO (code 10) at clientserver.c(127) [Receiver=3.1.3]
>>> Retrying...


>>> Starting retry 10 of 13 with rsync://[2a03:b0c0:3:d0::c3:f001]/gentoo-portage
>>> Checking server timestamp ...
rsync: failed to connect to 2a03:b0c0:3:d0::c3:f001 (2a03:b0c0:3:d0::c3:f001): Cannot assign requested address (99)
rsync error: error in socket IO (code 10) at clientserver.c(127) [Receiver=3.1.3]
>>> Retrying...


>>> Starting retry 11 of 13 with rsync://[2a01:4f8:140:5123::2]/gentoo-portage
>>> Checking server timestamp ...
rsync: failed to connect to 2a01:4f8:140:5123::2 (2a01:4f8:140:5123::2): Cannot assign requested address (99)
rsync error: error in socket IO (code 10) at clientserver.c(127) [Receiver=3.1.3]
>>> Retrying...


>>> Starting retry 12 of 13 with rsync://[2a00:8a60:e012:a00::21]/gentoo-portage
>>> Checking server timestamp ...
rsync: failed to connect to 2a00:8a60:e012:a00::21 (2a00:8a60:e012:a00::21): Cannot assign requested address (99)
rsync error: error in socket IO (code 10) at clientserver.c(127) [Receiver=3.1.3]
>>> Retrying...


>>> Starting retry 13 of 13 with rsync://[2a05:3e00:c:1003::220:229]/gentoo-portage
>>> Checking server timestamp ...
rsync: failed to connect to 2a05:3e00:c:1003::220:229 (2a05:3e00:c:1003::220:229): Cannot assign requested address (99)
rsync error: error in socket IO (code 10) at clientserver.c(127) [Receiver=3.1.3]
>>> Retrying...
!!! Exhausted addresses for rsync.de.gentoo.org
q: Updating ebuild cache for /usr/portage ... 
q: Finished 28098 entries in 0.496631 seconds

 * IMPORTANT: 5 config files in '/etc' need updating.
 * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
 * sections of the emerge man page to learn how to update config files.

 * IMPORTANT: 36 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


Action: sync for repo: gentoo, returned code = 1

 * An update to portage is available. It is _highly_ recommended
 * that you update portage now, before any other packages are updated.

 * To update portage, run 'emerge --oneshot portage' now.

Then this:

emerge --oneshot portage

catch22bbs / # emerge --oneshot portage

 * IMPORTANT: 36 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.

Calculating dependencies... done!
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.5/emerge", line 53, in <module>
    retval = emerge_main()
  File "/usr/lib/python3.5/site-packages/_emerge/main.py", line 1289, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib/python3.5/site-packages/_emerge/actions.py", line 3332, in run_action
    retval = action_build(emerge_config, spinner=spinner)
  File "/usr/lib/python3.5/site-packages/_emerge/actions.py", line 340, in action_build
    settings, trees, myopts, myparams, myaction, myfiles, spinner)
  File "/usr/lib/python3.5/site-packages/_emerge/depgraph.py", line 9755, in backtrack_depgraph
    myaction, myfiles, spinner)
  File "/usr/lib/python3.5/site-packages/_emerge/depgraph.py", line 9792, in _backtrack_depgraph
    success, favorites = mydepgraph.select_files(myfiles)
  File "/usr/lib/python3.5/site-packages/_emerge/depgraph.py", line 3937, in select_files
    return self._select_files(args)
  File "/usr/lib/python3.5/site-packages/_emerge/depgraph.py", line 3946, in _select_files
    self._load_vdb()
  File "/usr/lib/python3.5/site-packages/_emerge/depgraph.py", line 670, in _load_vdb
    scheduler.start()
  File "/usr/lib/python3.5/site-packages/_emerge/AsynchronousTask.py", line 30, in start
    self._start()
  File "/usr/lib/python3.5/site-packages/portage/util/_async/AsyncScheduler.py", line 90, in _start
    self._schedule()
  File "/usr/lib/python3.5/site-packages/_emerge/PollScheduler.py", line 154, in _schedule
    self._schedule_tasks()
  File "/usr/lib/python3.5/site-packages/portage/util/_async/AsyncScheduler.py", line 66, in _schedule_tasks
    task.start()
  File "/usr/lib/python3.5/site-packages/_emerge/AsynchronousTask.py", line 30, in start
    self._start()
  File "/usr/lib/python3.5/site-packages/_emerge/EbuildMetadataPhase.py", line 59, in _start
    self._async_wait()
  File "/usr/lib/python3.5/site-packages/_emerge/AbstractPollTask.py", line 105, in _async_wait
    self._unregister()
  File "/usr/lib/python3.5/site-packages/_emerge/EbuildMetadataPhase.py", line 147, in _unregister
    self.scheduler.remove_reader(self._files.ebuild)
AttributeError: 'NoneType' object has no attribute 'ebuild'

Can someone tell me what i'm doing wrong?

Thank you.

Any and all help is greatly appreciated.

Hi @ignatius,

did you call emerge as root?

Yes. As root.

then this is quite strange. Does touch /var/tmp/foo work? Please post the output of stat /var/tmp.

catch22bbs / # touch /var/tmp/foo
catch22bbs / # stat /var/tmp )MMMMMP|   .'
  File: /var/tmp          `-'       `--' 
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: 821h/2081d      Inode: 1774217     Links: 3
Access: (1755/drwxr-xr-t)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2023-02-18 17:53:44.174336692 +0000
Modify: 2023-02-18 17:53:44.778322576 +0000
Change: 2023-02-18 17:53:44.778322576 +0000
 Birth: -

Not sure what the MMMMP is..

Hi @ignatius,

Me neither :slight_smile: Maybe it's the rest of the output of a fomer command?

These permissions don't allow a non-root user to write in the folder, so they would result in a Permission denied message. Maybe emerge drops privilieges when it calls rsync.
Try to set chmod 1777 /var/tmp and call emerge again.

Hmm. Strange. It appeared to update, but when I try emerge --oneshot portage I stil get the python errors (after chmod 1777 /var/tmp) Here's the output:

catch22bbs / # emerge --sync
>>> Syncing repository 'gentoo' into '/usr/portage'...
>>> Starting rsync with rsync://46.101.221.22/gentoo-portage...
>>> Checking server timestamp ...
rsync8.de.gentoo.org

  IPv4:    46.101.221.22
  IPv6:    2a03:b0c0:3:d0::c3:f001 
  Contact: rsync@moonitor.org

receiving incremental file list
timestamp.chk

Number of files: 1 (reg: 1)
Number of created files: 0
Number of deleted files: 0
Number of regular files transferred: 1
Total file size: 32 bytes
Total transferred file size: 32 bytes
Literal data: 32 bytes
Matched data: 0 bytes
File list size: 41
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 104
Total bytes received: 125

sent 104 bytes  received 125 bytes  41.64 bytes/sec
total size is 32  speedup is 0.14

>>>
>>> Timestamps on the server and in the local repository are the same.
>>> Cancelling all further sync action. You are already up to date.
>>>
>>> In order to force sync, remove '/usr/portage/metadata/timestamp.chk'.
>>>

=== Sync completed for gentoo
q: Updating ebuild cache for /usr/portage ... 
q: Finished 28141 entries in 0.512437 seconds

 * IMPORTANT: 5 config files in '/etc' need updating.
 * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
 * sections of the emerge man page to learn how to update config files.

Action: sync for repo: gentoo, returned code = 0

 * An update to portage is available. It is _highly_ recommended
 * that you update portage now, before any other packages are updated.

 * To update portage, run 'emerge --oneshot portage' now.

Now,

catch22bbs /etc/portage # emerge --oneshot portage
Calculating dependencies... done!
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.5/emerge", line 53, in <module>
    retval = emerge_main()
  File "/usr/lib/python3.5/site-packages/_emerge/main.py", line 1289, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib/python3.5/site-packages/_emerge/actions.py", line 3332, in run_action
    retval = action_build(emerge_config, spinner=spinner)
  File "/usr/lib/python3.5/site-packages/_emerge/actions.py", line 340, in action_build
    settings, trees, myopts, myparams, myaction, myfiles, spinner)
  File "/usr/lib/python3.5/site-packages/_emerge/depgraph.py", line 9755, in backtrack_depgraph
    myaction, myfiles, spinner)
  File "/usr/lib/python3.5/site-packages/_emerge/depgraph.py", line 9792, in _backtrack_depgraph
    success, favorites = mydepgraph.select_files(myfiles)
  File "/usr/lib/python3.5/site-packages/_emerge/depgraph.py", line 3937, in select_files
    return self._select_files(args)
  File "/usr/lib/python3.5/site-packages/_emerge/depgraph.py", line 3946, in _select_files
    self._load_vdb()
  File "/usr/lib/python3.5/site-packages/_emerge/depgraph.py", line 670, in _load_vdb
    scheduler.start()
  File "/usr/lib/python3.5/site-packages/_emerge/AsynchronousTask.py", line 30, in start
    self._start()
  File "/usr/lib/python3.5/site-packages/portage/util/_async/AsyncScheduler.py", line 90, in _start
    self._schedule()
  File "/usr/lib/python3.5/site-packages/_emerge/PollScheduler.py", line 154, in _schedule
    self._schedule_tasks()
  File "/usr/lib/python3.5/site-packages/portage/util/_async/AsyncScheduler.py", line 66, in _schedule_tasks
    task.start()
  File "/usr/lib/python3.5/site-packages/_emerge/AsynchronousTask.py", line 30, in start
    self._start()
  File "/usr/lib/python3.5/site-packages/_emerge/EbuildMetadataPhase.py", line 59, in _start
    self._async_wait()
  File "/usr/lib/python3.5/site-packages/_emerge/AbstractPollTask.py", line 105, in _async_wait
    self._unregister()
  File "/usr/lib/python3.5/site-packages/_emerge/EbuildMetadataPhase.py", line 147, in _unregister
    self.scheduler.remove_reader(self._files.ebuild)
AttributeError: 'NoneType' object has no attribute 'ebuild'

Python 3.5 has been out of support for over two years now, it shouldn't be used anymore - the current Gentoo uses 3.10. I didn't find an older image, so I downloaded the current one and mounted it. The emerge code has of course changed in the meantime.
This is the code in the current image:

def _unregister(self):
    if self._files is not None:
        self.scheduler.remove_reader(self._files.ebuild)

Here self._files is checked for None already, so the message 'NoneType' object has no attribute 'ebuild' would be contradictory - if your older older would be the same. Please post the output of

grep -A5 def._unregister /usr/lib/python3.5/site-ackages/_emerge/EbuildMetadataPhase.py`

It could be quite cumbersome to debug the code via this forum... Moreover, it's more about figuring out why self._files is None.

The answer is probably, "No." But, would reverting back to Python2.7 help? I didn't get anything from that grep line.

Thanks.

Actually, you're right, it appears that emerge uses Python3.5... so, i'm screwed.

there was a typo, sorry. In site-packages I missed the p. Switching to Python 2 could help, but that version is even longer out of support.

Ok. Let me ask this: Would it be possible to install a new version of emerge and/or portage?

Hi @ignatius,

I would rather suggest upgrading the python version(s), step by step up to 3.10, or more reasonable, the complete system - if that is still possible. This should build & install all required tools/modules like emerge in their proper python versions. Unfortunately I have no experience with Gentoo. Maybe these links will help a bit:
https://wiki.gentoo.org/wiki/Project:Python
https://forums.gentoo.org/viewtopic-t-1052610-start-0.html
Gentoo is a Rolling Release, so it should be updated often.

I gave up on this. Instead, i've reverted back to Debian...

But, now i've run into another error:

catch22bbs:/# apt-get install vim    
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:
  irssi: Depends: perlapi-5.10.1 but it is not installable
  libgdk-pixbuf2.0-0: Depends: libgdk-pixbuf2.0-common (= 2.26.1-1+deb7u8) but it is not going to be installed
  libgtk2.0-0: Depends: libgtk2.0-common but it is not going to be installed
               Recommends: hicolor-icon-theme but it is not going to be installed
               Recommends: libgtk2.0-bin but it is not going to be installed
  liblocale-gettext-perl: PreDepends: perlapi-5.10.0 but it is not installable
  libomxil-bellagio-dev: Depends: libomxil-bellagio0 (= 0.9.3-4) but it is not going to be installed
  libpango1.0-0: Depends: libthai0 (>= 0.1.12) but it is not going to be installed
  libperl5.10: Depends: perl-base (= 5.10.1-16) but 5.14.2-21+deb7u6 is to be installed
  libtext-charwidth-perl: Depends: perlapi-5.10.0 but it is not installable
  libtext-iconv-perl: Depends: perlapi-5.10.0 but it is not installable
  libxxf86vm-dev: Depends: x11proto-xf86vidmode-dev (>= 2.2.99.1) but it is not going to be installed
  perl: Depends: perl-base (= 5.10.1-16) but 5.14.2-21+deb7u6 is to be installed
  perl-base: Conflicts: update-inetd (< 4.41) but 4.31em1 is to be installed
  python-numpy: Depends: libblas3 but it is not going to be installed or
                         libblas.so.3 or
                         libatlas3-base but it is not going to be installed
                Depends: liblapack3 but it is not going to be installed or
                         liblapack.so.3 or
                         libatlas3-base but it is not going to be installed
  udev: Depends: libudev0 (= 164-2) but 175-7.2 is to be installed
        Recommends: pciutils but it is not going to be installed
  vim: Depends: vim-common (= 2:7.3.547-7+deb7u4) but it is not going to be installed
       Depends: vim-runtime (= 2:7.3.547-7+deb7u4) but it is not going to be installed
       Depends: libacl1 (>= 2.2.51-8) but 2.2.49-4 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Then:

catch22bbs:~# apt-get -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:
  python2.5 python-gi libcurl3 gir1.2-glib-2.0 libssh2-1 libgirepository-1.0-1 python2.5-minimal libdb4.7 liboil0.3 python-gobject-2 python-gobject
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  irssi libclass-isa-perl libfile-copy-recursive-perl libgdk-pixbuf2.0-common libgtk2.0-common liblapack3 liblocale-gettext-perl libswitch-perl libtext-charwidth-perl libtext-iconv-perl libthai-data libthai0 perl perl-modules udev update-inetd x11proto-xf86vidmode-dev
Suggested packages:
  irssi-scripts perl-doc libterm-readline-gnu-perl libterm-readline-perl-perl libpod-plainer-perl
Recommended packages:
  pciutils
The following packages will be REMOVED:
  libomxil-bellagio-dev libperl5.10
The following NEW packages will be installed:
  libclass-isa-perl libfile-copy-recursive-perl libgdk-pixbuf2.0-common libgtk2.0-common liblapack3 libswitch-perl libthai-data libthai0 x11proto-xf86vidmode-dev
The following packages will be upgraded:
  irssi liblocale-gettext-perl libtext-charwidth-perl libtext-iconv-perl perl perl-modules udev update-inetd
8 upgraded, 9 newly installed, 2 to remove and 233 not upgraded.
130 not fully installed or removed.
Need to get 0B/14.4MB of archives.
After this operation, 28.0MB of additional disk space will be used.
Do you want to continue [Y/n]? 

And then:

WARNING: The following packages cannot be authenticated!
  udev liblapack3 libswitch-perl libclass-isa-perl perl-modules perl irssi liblocale-gettext-perl libthai-data libthai0 libtext-charwidth-perl libtext-iconv-perl libfile-copy-recursive-perl libgdk-pixbuf2.0-common libgtk2.0-common update-inetd x11proto-xf86vidmode-dev
Install these packages without verification [y/N]? y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "",
        LC_ALL = "en_US.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
debconf: Perl may be unconfigured (Can't locate Debconf/Log.pm in @INC (you may need to install the Debconf::Log module) (@INC contains: /usr/lib/perl5/site_perl/5.36.0/armv7l-linux /usr/lib/perl5/site_perl/5.36.0 /usr/lib/perl5/5.36.0/armv7l-linux /usr/lib/perl5/5.36.0 /usr/lib/perl5/site_perl/5.14.2 /usr/lib/perl5/site_perl) at (eval 1) line 4.
BEGIN failed--compilation aborted at (eval 1) line 4.
) -- aborting
Can not write log, openpty() failed (/dev/pts not mounted?)
dpkg: warning: files list file for package 'libaudiofile1:armel' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libjack-jackd2-0:armel' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libesd0:armel' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libcap2:armel' missing; assuming package has no files currently installed
(Reading database ... 45524 files and directories currently installed.)
Preparing to replace udev 164-2 (using .../udev_175-7.2_armel.deb) ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "",
        LC_ALL = "en_US.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Can't locate Debconf/Db.pm in @INC (you may need to install the Debconf::Db module) (@INC contains: /usr/lib/perl5/site_perl/5.36.0/armv7l-linux /usr/lib/perl5/site_perl/5.36.0 /usr/lib/perl5/5.36.0/armv7l-linux /usr/lib/perl5/5.36.0 /usr/lib/perl5/site_perl/5.14.2 /usr/lib/perl5/site_perl) at /usr/share/debconf/frontend line 6.
BEGIN failed--compilation aborted at /usr/share/debconf/frontend line 6.
dpkg: error processing /var/cache/apt/archives/udev_175-7.2_armel.deb (--unpack):
 subprocess new pre-installation script returned error exit status 2
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "",
        LC_ALL = "en_US.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "",
        LC_ALL = "en_US.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Unpacking liblapack3 (from .../liblapack3_3.4.1+dfsg-1+deb70u1_armel.deb) ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "",
        LC_ALL = "en_US.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Can't locate Debconf/Db.pm in @INC (you may need to install the Debconf::Db module) (@INC contains: /usr/lib/perl5/site_perl/5.36.0/armv7l-linux /usr/lib/perl5/site_perl/5.36.0 /usr/lib/perl5/5.36.0/armv7l-linux /usr/lib/perl5/5.36.0 /usr/lib/perl5/site_perl/5.14.2 /usr/lib/perl5/site_perl) at /usr/share/debconf/frontend line 6.
BEGIN failed--compilation aborted at /usr/share/debconf/frontend line 6.
dpkg: error processing /var/cache/apt/archives/liblapack3_3.4.1+dfsg-1+deb70u1_armel.deb (--unpack):
 subprocess new pre-installation script returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/udev_175-7.2_armel.deb
 /var/cache/apt/archives/liblapack3_3.4.1+dfsg-1+deb70u1_armel.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Could you possibly tell me how to solve this?

Thank you.

Hi @ignatius,

Gentoo is intended more for experienced users, I have the impression that you possibly don't belong to them :wink:

What do you mean with reverted to Debian? How did you do that?

Have you tried apt-get -f install, like suggested?

Please post the output of

$ rgrep ^deb /etc/apt/sources.list*
$ uname -a
$ cat /etc/os-release

I'm actually running Linux on a Zipit Z2 (google it), and have Debain installed on a micro SD card. I was using Gentoo on a different SD card.

catch22bbs:~# rgrep ^deb /etc/apt/sources.list*
/etc/apt/sources.list:deb http://archive.debian.org/debian-security/ wheezy/updates main
/etc/apt/sources.list:deb http://archive.debian.org/debian wheezy main
/etc/apt/sources.list:deb http://archive.debian.org/debian-security wheezy/updates main
/etc/apt/sources.list:deb-src http://archive.debian.org/debian-security/ wheezy/updates main
/etc/apt/sources.list:deb-src http://archive.debian.org/debian wheezy main
/etc/apt/sources.list:deb-src http://archive.debian.org/debian-security wheezy/updates main
/etc/apt/sources.list.bak:deb http://archive.debian.org/debian-security/ wheezy/updates main
/etc/apt/sources.list.bak:deb http://archive.debian.org/debian wheezy main
/etc/apt/sources.list.bak:deb http://archive.debian.org/debian-security wheezy/updates main
catch22bbs:~# uname -a
Linux catch22bbs 4.4.0+ #6 PREEMPT Wed Dec 27 17:57:23 CST 2017 armv5tel GNU/Linux
catch22bbs:~# cat /etc/os-release
NAME=Debian
 VERSION="7 (wheezy)"
 ID=debian
 VERSION_ID=77
 PRETTY_NAME="Debian 7 (wheezy)"
 ANSI_COLOR="1;31"

Thanks.

EDIT: And yes, I realize this version of Debian (Wheezy) is outdated.

Debian 7 is indeed very outdated - since 2018-05.

That's is a bit strange. What gives

$ dpkg -l debconf*
$ apt-cache policy debconf
$ ls -t /var/cache/apt/archives/debconf_* | head -1 | xargs -r dpkg -i
$ apt-get -f install

EDIT: If no debconf* packages are available in the apt cache, download it from https://snapshot.debian.org/archive/debian/20121226T091927Z/pool/main/d/debconf/debconf_1.5.49_all.deb and install it via dpkg -i debconf*deb

I followed your instructions and got this:

catch22bbs:~# ls -t /var/cache/apt/archives/debconf_* | head -1 | xargs -r dpkg -i 
ls: cannot access /var/cache/apt/archives/debconf_*: No such file or directory

Then....

catch22bbs:~# apt-get -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:
  python2.5 python-gi libcurl3 gir1.2-glib-2.0 libssh2-1 libgirepository-1.0-1 python2.5-minimal libdb4.7 liboil0.3 python-gobject-2 python-gobject
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  irssi libclass-isa-perl libfile-copy-recursive-perl libgdk-pixbuf2.0-common libgtk2.0-common liblapack3 liblocale-gettext-perl libswitch-perl libtext-charwidth-perl libtext-iconv-perl libthai-data libthai0 perl perl-modules udev update-inetd x11proto-xf86vidmode-dev
Suggested packages:
  irssi-scripts perl-doc libterm-readline-gnu-perl libterm-readline-perl-perl libpod-plainer-perl
Recommended packages:
  pciutils
The following packages will be REMOVED:
  libomxil-bellagio-dev libperl5.10
The following NEW packages will be installed:
  libclass-isa-perl libfile-copy-recursive-perl libgdk-pixbuf2.0-common libgtk2.0-common liblapack3 libswitch-perl libthai-data libthai0 x11proto-xf86vidmode-dev
The following packages will be upgraded:
  irssi liblocale-gettext-perl libtext-charwidth-perl libtext-iconv-perl perl perl-modules udev update-inetd
8 upgraded, 9 newly installed, 2 to remove and 232 not upgraded.
131 not fully installed or removed.
Need to get 0B/14.4MB of archives.
After this operation, 28.0MB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
  udev liblapack3 libswitch-perl libclass-isa-perl perl-modules perl irssi liblocale-gettext-perl libthai-data libthai0 libtext-charwidth-perl libtext-iconv-perl libfile-copy-recursive-perl libgdk-pixbuf2.0-common libgtk2.0-common update-inetd x11proto-xf86vidmode-dev
Install these packages without verification [y/N]? y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "",
        LC_ALL = "en_US.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
debconf: Perl may be unconfigured (Can't locate Debconf/Log.pm in @INC (you may need to install the Debconf::Log module) (@INC contains: /usr/lib/perl5/site_perl/5.36.0/armv7l-linux /usr/lib/perl5/site_perl/5.36.0 /usr/lib/perl5/5.36.0/armv7l-linux /usr/lib/perl5/5.36.0 /usr/lib/perl5/site_perl/5.14.2 /usr/lib/perl5/site_perl) at (eval 1) line 4.
BEGIN failed--compilation aborted at (eval 1) line 4.
) -- aborting
Can not write log, openpty() failed (/dev/pts not mounted?)
Setting up debconf (1.5.49) ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "",
        LC_ALL = "en_US.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Can't locate Debconf/Db.pm in @INC (you may need to install the Debconf::Db module) (@INC contains: /usr/lib/perl5/site_perl/5.36.0/armv7l-linux /usr/lib/perl5/site_perl/5.36.0 /usr/lib/perl5/5.36.0/armv7l-linux /usr/lib/perl5/5.36.0 /usr/lib/perl5/site_perl/5.14.2 /usr/lib/perl5/site_perl) at /usr/share/debconf/frontend line 6.
BEGIN failed--compilation aborted at /usr/share/debconf/frontend line 6.
dpkg: error processing debconf (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 debconf
E: Sub-process /usr/bin/dpkg returned an error code (1)

Thank you.

it seems that your perl lib is in a different location than it is expected (/usr/lib/perl5) by apt-get/dpkg. Next try:

plib=$(dpkg -L debconf | grep /Db.pm | cut -d/ -f1-4)
echo PLIB $plib
export PERL5LIB=$plib; apt-get -f install

Nope.

catch22bbs:~# apt-get -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:
  python2.5 python-gi libcurl3 gir1.2-glib-2.0 libssh2-1 libgirepository-1.0-1 python2.5-minimal libdb4.7 liboil0.3 python-gobject-2 python-gobject
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  irssi libclass-isa-perl libfile-copy-recursive-perl libgdk-pixbuf2.0-common libgtk2.0-common liblapack3 liblocale-gettext-perl libswitch-perl libtext-charwidth-perl libtext-iconv-perl libthai-data libthai0 perl perl-modules udev update-inetd x11proto-xf86vidmode-dev
Suggested packages:
  irssi-scripts perl-doc libterm-readline-gnu-perl libterm-readline-perl-perl libpod-plainer-perl
Recommended packages:
  pciutils
The following packages will be REMOVED:
  libomxil-bellagio-dev libperl5.10
The following NEW packages will be installed:
  libclass-isa-perl libfile-copy-recursive-perl libgdk-pixbuf2.0-common libgtk2.0-common liblapack3 libswitch-perl libthai-data libthai0 x11proto-xf86vidmode-dev
The following packages will be upgraded:
  irssi liblocale-gettext-perl libtext-charwidth-perl libtext-iconv-perl perl perl-modules udev update-inetd
8 upgraded, 9 newly installed, 2 to remove and 232 not upgraded.
131 not fully installed or removed.
Need to get 0B/14.4MB of archives.
After this operation, 28.0MB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
  udev liblapack3 libswitch-perl libclass-isa-perl perl-modules perl irssi liblocale-gettext-perl libthai-data libthai0 libtext-charwidth-perl libtext-iconv-perl libfile-copy-recursive-perl libgdk-pixbuf2.0-common libgtk2.0-common update-inetd x11proto-xf86vidmode-dev
Install these packages without verification [y/N]? y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "",
        LC_ALL = "en_US.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Unescaped left brace in regex is passed through in regex; marked by <-- HERE in m/^(.*?)(\\)?\${ <-- HERE ([^{}]+)}(.*)$/ at /usr/share/perl5/Debconf/Question.pm line 72.
Unescaped left brace in regex is passed through in regex; marked by <-- HERE in m/\${ <-- HERE ([^}]+)}/ at /usr/share/perl5/Debconf/Config.pm line 30.
Preconfiguring packages ...
Can not write log, openpty() failed (/dev/pts not mounted?)
Setting up debconf (1.5.49) ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "",
        LC_ALL = "en_US.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Unescaped left brace in regex is passed through in regex; marked by <-- HERE in m/^(.*?)(\\)?\${ <-- HERE ([^{}]+)}(.*)$/ at /usr/share/perl5/Debconf/Question.pm line 72.
Unescaped left brace in regex is passed through in regex; marked by <-- HERE in m/\${ <-- HERE ([^}]+)}/ at /usr/share/perl5/Debconf/Config.pm line 30.
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 289, in <module>
    main()
  File "/usr/bin/pycompile", line 262, in main
    options.force, options.optimize, e_patterns)
  File "/usr/bin/pycompile", line 178, in compile
    pipe.send(fn)
  File "/usr/bin/pycompile", line 141, in py_compile
    stdin.write(filename + '\n')
IOError: [Errno 32] Broken pipe
dpkg: error processing debconf (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 debconf
E: Sub-process /usr/bin/dpkg returned an error code (1)