[Software] "Warning: Nala Falling back to apt_pkg. The following downloads failed:"

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
User avatar
MikeLieberman
Posts: 186
Joined: 2013-01-29 17:26
Location: General Santos City, Philippines
Has thanked: 18 times
Been thanked: 4 times

[Software] "Warning: Nala Falling back to apt_pkg. The following downloads failed:"

#1 Post by MikeLieberman »

Just these past two days, every Debian install I have (ten) as it tried to upgrade to 6.1.0-26 has given me this warning
Warning: Falling back to apt_pkg. The following downloads failed:
As in:

Code: Select all

Error: Download failure. The following downloads failed:
  php8.2-cli_8.2.24-1~deb12u1_amd64.deb, libapache2-mod-php8.2_8.2.24-1~deb12u1_amd64.deb, linux-image-6.1.0-26-amd64_6.1.112-1_amd64.deb, php8.2-common_8.2.24-1~deb12u1_amd64.deb, php8.2-opcache_8.2.24-1~deb12u1_amd64.deb, php8.2-readline_8.2.24-1~deb12u1_amd64.deb, php8.2-mysql_8.2.24-1~deb12u1_amd64.deb, php8.2_8.2.24-1~deb12u1_all.deb, linux-image-amd64_6.1.112-1_amd64.deb
Warning: Falling back to apt_pkg. The following downloads failed
And twice I have gotten this even after this as today when I saw:

Code: Select all

Error: Download failure. The following downloads failed:
  firefox-esr_128.3.0esr-1~deb12u1_amd64.deb, libpskc0_2.6.7-3.1+deb12u1_amd64.deb
Warning: Falling back to apt_pkg. The following downloads failed:
I have never seen this warning before and it is affecting all of the installs. What's going on?
Last edited by MikeLieberman on 2024-10-08 08:11, edited 1 time in total.
What? Me worry? [A.E. Newman]

User avatar
stevepusser
Posts: 13067
Joined: 2009-10-06 05:53
Has thanked: 48 times
Been thanked: 96 times

Re: [Software] "Warning: Falling back to apt_pkg. The following downloads failed:"

#2 Post by stevepusser »

The usual first try to fix bad downloads is to try another Debian mirror if possible.

A temporary fix is to manually download and install the deb(s) from packages.debian.org. (very bottom of page) example:

https://packages.debian.org/bookworm/firefox-esr
MX Linux packager and developer

User avatar
fabien
Forum Helper
Forum Helper
Posts: 1158
Joined: 2019-12-03 12:51
Location: Anarres (Toulouse, France actually)
Has thanked: 101 times
Been thanked: 265 times

Re: [Software] "Warning: Falling back to apt_pkg. The following downloads failed:"

#3 Post by fabien »

MikeLieberman wrote: 2024-10-05 00:28

Code: Select all

Warning: Falling back to apt_pkg. The following downloads failed:
It cost me almost an hour to figure out which program sent this message. Please always paste the command you issued when reporting a problem.
I found it in nala (after searching in apt and aptitude):

Code: Select all

   if downloader.failed:
      eprint(
         _("{error} Download failure. The following downloads failed:").format(
            error=ERROR_PREFIX
         )
      )
      eprint(f"  {', '.join(color(pkg, 'YELLOW') for pkg in downloader.failed)}")

      if downloader.fatal:
         sys.exit(1)
      if arguments.download_only:
         sys.exit(_("In download only mode. Not falling back to apt_pkg."))
      eprint(
         _(
            "{warning} Falling back to apt_pkg. The following downloads failed:"
         ).format(warning=WARNING_PREFIX)
      )
Please paste apt errors using apt when debugging an apt error.
Please also paste the output of

Code: Select all

$> apt policy
ImageShare your Debian SCRIPTS
There will be neither barrier nor walls, neither official nor guard, there will be no more desert and the entire world will become a garden. — Anacharsis Cloots

User avatar
MikeLieberman
Posts: 186
Joined: 2013-01-29 17:26
Location: General Santos City, Philippines
Has thanked: 18 times
Been thanked: 4 times

Re: [Software] "Warning: Falling back to apt_pkg. The following downloads failed:"

#4 Post by MikeLieberman »

@fabien

Here is the command as it is used. Sorry for your problem.

Code: Select all

sudo nala update && sudo nala upgrade && sudo apt dist-upgrade && sudo apt autoremove
And as there are ten sources.list files from the ten installations (and clearly not all are the same) I have not listed them. All do however use the ftp.us.debian.org/debian site. I am in the Philippines, and over the years, I have found the more local sites to sort of wink in and out of existence.

You ask for apt policy... but there are, as I said TEN installtions. Posting them all here just doesn't work. I will post two of them!

Code: Select all

# apt policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://download.virtualbox.org/virtualbox/debian bookworm/contrib amd64 Packages
     release o=Oracle Corporation,n=bookworm,l=Oracle Corporation,c=contrib,b=amd64
     origin download.virtualbox.org
 500 https://packagecloud.io/ookla/speedtest-cli/debian bullseye/main amd64 Packages
     release v=1,o=packagecloud.io/ookla/speedtest-cli,a=bullseye,n=bullseye,l=speedtest-cli,c=main,b=amd64
     origin packagecloud.io
 500 https://packages.microsoft.com/repos/edge stable/main amd64 Packages
     release o=edge stable,a=stable,n=stable,l=edge stable,c=main,b=amd64
     origin packages.microsoft.com
 500 http://download.opensuse.org/repositories/hardware:/razer/Debian_12  Packages
     release o=obs://build.opensuse.org/hardware:razer/Debian_12,n=Debian_12,l=hardware:razer,c=
     origin download.opensuse.org
 500 https://dl.google.com/linux/chrome/deb stable/main amd64 Packages
     release v=1.0,o=Google LLC,a=stable,n=stable,l=Google,c=main,b=amd64
     origin dl.google.com
 500 https://cli.github.com/packages stable/main amd64 Packages
     release o=gh,n=stable,l=gh,c=main,b=amd64
     origin cli.github.com
 500 https://deb.debian.org/debian bookworm-updates/non-free-firmware amd64 Packages
     release v=12-updates,o=Debian,a=stable-updates,n=bookworm-updates,l=Debian,c=non-free-firmware,b=amd64
     origin deb.debian.org
 500 https://deb.debian.org/debian bookworm-updates/non-free amd64 Packages
     release v=12-updates,o=Debian,a=stable-updates,n=bookworm-updates,l=Debian,c=non-free,b=amd64
     origin deb.debian.org
 500 https://deb.debian.org/debian bookworm-updates/contrib amd64 Packages
     release v=12-updates,o=Debian,a=stable-updates,n=bookworm-updates,l=Debian,c=contrib,b=amd64
     origin deb.debian.org
 500 https://deb.debian.org/debian bookworm-updates/main amd64 Packages
     release v=12-updates,o=Debian,a=stable-updates,n=bookworm-updates,l=Debian,c=main,b=amd64
     origin deb.debian.org
 500 http://security.debian.org/debian-security bookworm-security/non-free-firmware amd64 Packages
     release v=12,o=Debian,a=stable-security,n=bookworm-security,l=Debian-Security,c=non-free-firmware,b=amd64
     origin security.debian.org
 500 http://security.debian.org/debian-security bookworm-security/contrib amd64 Packages
     release v=12,o=Debian,a=stable-security,n=bookworm-security,l=Debian-Security,c=contrib,b=amd64
     origin security.debian.org
 500 http://security.debian.org/debian-security bookworm-security/main amd64 Packages
     release v=12,o=Debian,a=stable-security,n=bookworm-security,l=Debian-Security,c=main,b=amd64
     origin security.debian.org
 100 http://deb.debian.org/debian bookworm-backports/non-free-firmware amd64 Packages
     release o=Debian Backports,a=stable-backports,n=bookworm-backports,l=Debian Backports,c=non-free-firmware,b=amd64
     origin deb.debian.org
 100 http://deb.debian.org/debian bookworm-backports/non-free amd64 Packages
     release o=Debian Backports,a=stable-backports,n=bookworm-backports,l=Debian Backports,c=non-free,b=amd64
     origin deb.debian.org
 100 http://deb.debian.org/debian bookworm-backports/contrib amd64 Packages
     release o=Debian Backports,a=stable-backports,n=bookworm-backports,l=Debian Backports,c=contrib,b=amd64
     origin deb.debian.org
 100 http://deb.debian.org/debian bookworm-backports/main amd64 Packages
     release o=Debian Backports,a=stable-backports,n=bookworm-backports,l=Debian Backports,c=main,b=amd64
     origin deb.debian.org
 500 http://deb.debian.org/debian bookworm/non-free-firmware amd64 Packages
     release v=12.7,o=Debian,a=stable,n=bookworm,l=Debian,c=non-free-firmware,b=amd64
     origin deb.debian.org
 500 http://deb.debian.org/debian bookworm/main amd64 Packages
     release v=12.7,o=Debian,a=stable,n=bookworm,l=Debian,c=main,b=amd64
     origin deb.debian.org
 500 http://deb.debian.org/debian bookworm/non-free amd64 Packages
     release v=12.7,o=Debian,a=stable,n=bookworm,l=Debian,c=non-free,b=amd64
     origin deb.debian.org
 500 http://deb.debian.org/debian bookworm/contrib amd64 Packages
     release v=12.7,o=Debian,a=stable,n=bookworm,l=Debian,c=contrib,b=amd64
     origin deb.debian.org
 500 http://ftp.us.debian.org/debian bookworm-proposed-updates/main amd64 Packages
     release v=12-updates,o=Debian,a=proposed-updates,n=bookworm-proposed-updates,l=Debian,c=main,b=amd64
     origin ftp.us.debian.org
Pinned packages:
     linux-image-6.1.0-14-amd64 -> 6.1.64-1 with priority -1
The second:

Code: Select all

 apt policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 https://packages.sury.org/nginx bookworm/main amd64 Packages
     release o=deb.sury.org,a=bookworm,n=bookworm,c=main,b=amd64
     origin packages.sury.org
 500 https://packages.sury.org/nginx-mainline bookworm/main amd64 Packages
     release o=deb.sury.org,a=bookworm,n=bookworm,c=main,b=amd64
     origin packages.sury.org
 500 https://packages.sury.org/apache2 bookworm/main amd64 Packages
     release o=deb.sury.org,a=bookworm,n=bookworm,c=main,b=amd64
     origin packages.sury.org
 500 http://deb.debian.org/debian bookworm-updates/main amd64 Packages
     release v=12-updates,o=Debian,a=stable-updates,n=bookworm-updates,l=Debian,c=main,b=amd64
     origin deb.debian.org
 500 http://security.debian.org/debian-security bookworm-security/main amd64 Packages
     release v=12,o=Debian,a=stable-security,n=bookworm-security,l=Debian-Security,c=main,b=amd64
     origin security.debian.org
 500 http://deb.debian.org/debian bookworm/main amd64 Packages
     release v=12.7,o=Debian,a=stable,n=bookworm,l=Debian,c=main,b=amd64
     origin deb.debian.org
Pinned packages:
Finally, here is more detail from a session using the same command from today:

Code: Select all

3 packages can be upgraded. Run 'nala list --upgradable' to see them.
╭─ Updating Package List ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│No Change: http://security.debian.org/debian-security bookworm-security InRelease                                                                                                                                     │
│No Change: http://deb.debian.org/debian bookworm InRelease                                                                                                                                                            │
│No Change: http://deb.debian.org/debian bookworm-updates InRelease                                                                                                                                                    │
│Fetched 0 Bytes in 3s (0 bytes/s)                                                                                                                                                                                     │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
========================================================================================================================================================================================================================
 Upgrading                                                                                                                                                                                                              
========================================================================================================================================================================================================================
  Package:                                                                Old Version:                                    New Version:                                                                           Size:  
  libgsf-1-114                                                            1.14.50-1                                       1.14.50-1+deb12u1                                                                     154 KB  
  libgsf-1-common                                                         1.14.50-1                                       1.14.50-1+deb12u1                                                                     154 KB  
  libgsf-bin                                                              1.14.50-1                                       1.14.50-1+deb12u1                                                                      70 KB  
                                                                                                                                                                                                                        
========================================================================================================================================================================================================================
 Summary                                                                                                                                                                                                                
========================================================================================================================================================================================================================
 Upgrade 3 Packages                                                                                                                                                                                                     
                                                                                                                                                                                                                        
 Total download size  378 KB   
 Disk space to free    25 KB   
                               
Do you want to continue? [Y/n] 
Error: All connection attempts failed: http://security.debian.org/debian-security/pool/updates/main/libg/libgsf/libgsf-1-common_1.14.50-1%2Bdeb12u1_all.deb
Error: All connection attempts failed: http://security.debian.org/debian-security/pool/updates/main/libg/libgsf/libgsf-bin_1.14.50-1%2Bdeb12u1_amd64.deb
Error: All connection attempts failed: http://security.debian.org/debian-security/pool/updates/main/libg/libgsf/libgsf-1-114_1.14.50-1%2Bdeb12u1_amd64.deb
╭─ Downloading… ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Total Packages: 0/3                                                                                                                                                                                                  │
│ Starting Downloads…                                                                                                                                                                                                  │
│ Time Remaining: -:--:-- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0% • 0.0/378.0 KB • ? │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Error: Download failure. The following downloads failed:
  libgsf-1-common_1.14.50-1+deb12u1_all.deb, libgsf-bin_1.14.50-1+deb12u1_amd64.deb, libgsf-1-114_1.14.50-1+deb12u1_amd64.deb
Warning: Falling back to apt_pkg. The following downloads failed:
╭─ Updating Packages ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│Downloaded:   http://security.debian.org/debian-security bookworm-security/main amd64 libgsf-1-common all 1.14.50-1+deb12u1 [154 KB]                                                                                  │
│Downloaded:   http://security.debian.org/debian-security bookworm-security/main amd64 libgsf-1-114 amd64 1.14.50-1+deb12u1 [154 KB]                                                                                   │
│Downloaded:   http://security.debian.org/debian-security bookworm-security/main amd64 libgsf-bin amd64 1.14.50-1+deb12u1 [70 KB]                                                                                      │
│Fetched 378 KB in 0s (0 bytes/s)                                                                                                                                                                                      │
│Unpacking:  libgsf-1-common (1.14.50-1+deb12u1) over (1.14.50-1)                                                                                                                                                      │
│Unpacking:  libgsf-1-114:amd64 (1.14.50-1+deb12u1) over (1.14.50-1)                                                                                                                                                   │
│Unpacking:  libgsf-bin (1.14.50-1+deb12u1) over (1.14.50-1)                                                                                                                                                           │
│Setting up: libgsf-1-common (1.14.50-1+deb12u1)                                                                                                                                                                       │
│Setting up: libgsf-1-114:amd64 (1.14.50-1+deb12u1)                                                                                                                                                                    │
│Setting up: libgsf-bin (1.14.50-1+deb12u1)                                                                                                                                                                            │
│Processing: triggers for man-db (2.11.2-2)                                                                                                                                                                            │
│Processing: triggers for libc-bin (2.36-9+deb12u8)                                      
What? Me worry? [A.E. Newman]

User avatar
fabien
Forum Helper
Forum Helper
Posts: 1158
Joined: 2019-12-03 12:51
Location: Anarres (Toulouse, France actually)
Has thanked: 101 times
Been thanked: 265 times

Re: [Software] "Warning: Falling back to apt_pkg. The following downloads failed:"

#5 Post by fabien »

MikeLieberman wrote: 2024-10-06 02:21

Code: Select all

sudo nala update && sudo nala upgrade && sudo apt dist-upgrade && sudo apt autoremove
Thanks. Just a note on this. According to nala's manual:
upgrade

upgrade upgrades packages installed on the system.

By default nala will run the equivalent of apt update && apt full-upgrade --auto-remove.
So you shouldn't need 'nala update' and the following apt commands. Also note that although apt understands the apt-get command 'dist-upgrade', the correct command is 'full-upgrade'.
MikeLieberman wrote: 2024-10-06 02:21

Code: Select all

Error: Download failure. The following downloads failed:
  libgsf-1-common_1.14.50-1+deb12u1_all.deb, libgsf-bin_1.14.50-1+deb12u1_amd64.deb, libgsf-1-114_1.14.50-1+deb12u1_amd64.deb
Warning: Falling back to apt_pkg. The following downloads failed:
╭─ Updating Packages ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│Downloaded:   http://security.debian.org/debian-security bookworm-security/main amd64 libgsf-1-common all 1.14.50-1+deb12u1 [154 KB]                                                                                  │
│Downloaded:   http://security.debian.org/debian-security bookworm-security/main amd64 libgsf-1-114 amd64 1.14.50-1+deb12u1 [154 KB]                                                                                   │
│Downloaded:   http://security.debian.org/debian-security bookworm-security/main amd64 libgsf-bin amd64 1.14.50-1+deb12u1 [70 KB]                                                                                      │
│Fetched 378 KB in 0s (0 bytes/s)                                                                                                                                                                                      │
So this is definitely not a problem with apt but with nala (nala successfully falls back to apt functionality). You can confirm this by using apt instead of nala.
nala has its own download mechanism (probably using python3-httpx):
man 8 nala wrote:nala downloads packages in parallel. Along with this nala can download packages from multiple mirrors concurrently to speed up downloads further.
Maybe this will give some clues:
man 8 nala-upgrade wrote:--debug
Print helpful information for solving issues.

Code: Select all

#> nala --debug upgrade
Note: please update the title of your first post to reflect that this is a nala issue, e.g.
[Software] nala "Warning: Falling back to apt_pkg. The following downloads failed:"
ImageShare your Debian SCRIPTS
There will be neither barrier nor walls, neither official nor guard, there will be no more desert and the entire world will become a garden. — Anacharsis Cloots

User avatar
MikeLieberman
Posts: 186
Joined: 2013-01-29 17:26
Location: General Santos City, Philippines
Has thanked: 18 times
Been thanked: 4 times

Re: [Software] "Warning: Nala Falling back to apt_pkg. The following downloads failed:"

#6 Post by MikeLieberman »

I have changed the title

This is an invalid command.

Code: Select all

nala --debug upgrade
What? Me worry? [A.E. Newman]

User avatar
fabien
Forum Helper
Forum Helper
Posts: 1158
Joined: 2019-12-03 12:51
Location: Anarres (Toulouse, France actually)
Has thanked: 101 times
Been thanked: 265 times

Re: [Software] "Warning: Nala Falling back to apt_pkg. The following downloads failed:"

#7 Post by fabien »

Yes, nala is a little mischievous :)

Code: Select all

#> nala upgrade --debug
In order to test without waiting for new updates, you can do this:

Code: Select all

#> apt clean      ### nala does not clean package cache
#> apt install git-man=1:2.39.2-1.1 putty-doc=0.78-2+deb12u1
Assuming these packages are not already installed, this will install git-man from bookworm (new version in bookworm-security) and putty-doc from bookworm-security (new version in bookworm). Then upgrade with nala using the --debug option and post the entire output.
ImageShare your Debian SCRIPTS
There will be neither barrier nor walls, neither official nor guard, there will be no more desert and the entire world will become a garden. — Anacharsis Cloots

User avatar
fabien
Forum Helper
Forum Helper
Posts: 1158
Joined: 2019-12-03 12:51
Location: Anarres (Toulouse, France actually)
Has thanked: 101 times
Been thanked: 265 times

Re: [Software] "Warning: Nala Falling back to apt_pkg. The following downloads failed:"

#8 Post by fabien »

Hello @MikeLieberman, do you have any news on the topic?
ImageShare your Debian SCRIPTS
There will be neither barrier nor walls, neither official nor guard, there will be no more desert and the entire world will become a garden. — Anacharsis Cloots

User avatar
MikeLieberman
Posts: 186
Joined: 2013-01-29 17:26
Location: General Santos City, Philippines
Has thanked: 18 times
Been thanked: 4 times

Re: [Software] "Warning: Nala Falling back to apt_pkg. The following downloads failed:"

#9 Post by MikeLieberman »

@fabien
It did not work on most. It seemed to work on two but that might have been a fluke. It didn't work on the other eight.

Nala seems to be having problems reading the "pool" folder.
What? Me worry? [A.E. Newman]

User avatar
fabien
Forum Helper
Forum Helper
Posts: 1158
Joined: 2019-12-03 12:51
Location: Anarres (Toulouse, France actually)
Has thanked: 101 times
Been thanked: 265 times

Re: [Software] "Warning: Nala Falling back to apt_pkg. The following downloads failed:"

#10 Post by fabien »

Hello,

please post the --debug output if you want to continue debugging the problem, thanks.
ImageShare your Debian SCRIPTS
There will be neither barrier nor walls, neither official nor guard, there will be no more desert and the entire world will become a garden. — Anacharsis Cloots

Post Reply