PDA

View Full Version : Trouble running apt-get update offline



yetta
2017-04-20, 16:51
I'm trying to apt-get update kali offline.

I've tried the below two methods

Method 1 from http://www.webupd8.org/2009/11/get-list-of-packages-and-dependencies.html

sudo apt-get --print-uris update | grep ^\' | cut -d\' > mydownload.txt

mydownload.txt now has:


http://http.kali.org/kali/dists/kali-rolling/InRelease
http://http.kali.org/kali/dists/kali-rolling/main/source/Sources.xz
http://http.kali.org/kali/dists/kali-rolling/contrib/source/Sources.xz
http://http.kali.org/kali/dists/kali-rolling/non-free/source/Sources.xz
http://http.kali.org/kali/dists/kali-rolling/main/binary-i386/Packages.xz
http://http.kali.org/kali/dists/kali-rolling/main/binary-all/Packages.xz
http://http.kali.org/kali/dists/kali-rolling/main/i18n/Translation-en_US.xz
http://http.kali.org/kali/dists/kali-rolling/main/i18n/Translation-en.xz
http://http.kali.org/kali/dists/kali-rolling/contrib/binary-i386/Packages.xz
http://http.kali.org/kali/dists/kali-rolling/contrib/binary-all/Packages.xz
http://http.kali.org/kali/dists/kali-rolling/contrib/i18n/Translation-en_US.xz
http://http.kali.org/kali/dists/kali-rolling/contrib/i18n/Translation-en.xz
http://http.kali.org/kali/dists/kali-rolling/non-free/binary-i386/Packages.xz
http://http.kali.org/kali/dists/kali-rolling/non-free/binary-all/Packages.xz
http://http.kali.org/kali/dists/kali-rolling/non-free/i18n/Translation-en_US.xz
http://http.kali.org/kali/dists/kali-rolling/non-free/i18n/Translation-en.xz

Then when I do this from an online Kali

sudo wget --input-file=mydownload.txt


I get:


root@kali:/media/root/Lexar# wget --input-file=mydownload.txt
--2017-04-20 10:06:17-- http://http.kali.org/kali/dists/kali-rolling/InRelease
Resolving http.kali.org (http.kali.org)... 192.99.200.113
Connecting to http.kali.org (http.kali.org)|192.99.200.113|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://kali.mirror.garr.it/mirrors/kali/dists/kali-rolling/InRelease [following]
--2017-04-20 10:06:18-- http://kali.mirror.garr.it/mirrors/kali/dists/kali-rolling/InRelease
Resolving kali.mirror.garr.it (kali.mirror.garr.it)... 90.147.160.69, 2001:760:ffff:b6:4:100:0:69
Connecting to kali.mirror.garr.it (kali.mirror.garr.it)|90.147.160.69|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 30490 (30K) [text/plain]
Saving to: ‘InRelease.2’

InRelease.2 100%[================================================== ====================================>] 29.78K 87.9KB/s in 0.3s

2017-04-20 10:06:19 (87.9 KB/s) - ‘InRelease.2’ saved [30490/30490]

--2017-04-20 10:06:19-- http://http.kali.org/kali/dists/kali-rolling/main/source/Sources.xz
Connecting to http.kali.org (http.kali.org)|192.99.200.113|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-04-20 10:06:20 ERROR 404: Not Found.

--2017-04-20 10:06:20-- http://http.kali.org/kali/dists/kali-rolling/contrib/source/Sources.xz
Reusing existing connection to http.kali.org:80.
HTTP request sent, awaiting response... 404 Not Found
2017-04-20 10:06:20 ERROR 404: Not Found.

--2017-04-20 10:06:20-- http://http.kali.org/kali/dists/kali-rolling/non-free/source/Sources.xz
Reusing existing connection to http.kali.org:80.
HTTP request sent, awaiting response... 404 Not Found
2017-04-20 10:06:20 ERROR 404: Not Found.

--2017-04-20 10:06:20-- http://http.kali.org/kali/dists/kali-rolling/main/binary-i386/Packages.xz
Reusing existing connection to http.kali.org:80.
HTTP request sent, awaiting response... 404 Not Found
2017-04-20 10:06:21 ERROR 404: Not Found.

--2017-04-20 10:06:21-- http://http.kali.org/kali/dists/kali-rolling/main/binary-all/Packages.xz
Reusing existing connection to http.kali.org:80.
HTTP request sent, awaiting response... 404 Not Found
2017-04-20 10:06:21 ERROR 404: Not Found.

--2017-04-20 10:06:21-- http://http.kali.org/kali/dists/kali-rolling/main/i18n/Translation-en_US.xz
Reusing existing connection to http.kali.org:80.
HTTP request sent, awaiting response... 404 Not Found
2017-04-20 10:06:21 ERROR 404: Not Found.

--2017-04-20 10:06:21-- http://http.kali.org/kali/dists/kali-rolling/main/i18n/Translation-en.xz
Reusing existing connection to http.kali.org:80.
HTTP request sent, awaiting response... 404 Not Found
2017-04-20 10:06:21 ERROR 404: Not Found.

--2017-04-20 10:06:21-- http://http.kali.org/kali/dists/kali-rolling/contrib/binary-i386/Packages.xz
Reusing existing connection to http.kali.org:80.
HTTP request sent, awaiting response... 404 Not Found
2017-04-20 10:06:22 ERROR 404: Not Found.

--2017-04-20 10:06:22-- http://http.kali.org/kali/dists/kali-rolling/contrib/binary-all/Packages.xz
Reusing existing connection to http.kali.org:80.
HTTP request sent, awaiting response... 404 Not Found
2017-04-20 10:06:22 ERROR 404: Not Found.

--2017-04-20 10:06:22-- http://http.kali.org/kali/dists/kali-rolling/contrib/i18n/Translation-en_US.xz
Reusing existing connection to http.kali.org:80.
HTTP request sent, awaiting response... 404 Not Found
2017-04-20 10:06:22 ERROR 404: Not Found.

--2017-04-20 10:06:22-- http://http.kali.org/kali/dists/kali-rolling/contrib/i18n/Translation-en.xz
Reusing existing connection to http.kali.org:80.
HTTP request sent, awaiting response... 404 Not Found
2017-04-20 10:06:22 ERROR 404: Not Found.

--2017-04-20 10:06:22-- http://http.kali.org/kali/dists/kali-rolling/non-free/binary-i386/Packages.xz
Reusing existing connection to http.kali.org:80.
HTTP request sent, awaiting response... 404 Not Found
2017-04-20 10:06:23 ERROR 404: Not Found.

--2017-04-20 10:06:23-- http://http.kali.org/kali/dists/kali-rolling/non-free/binary-all/Packages.xz
Reusing existing connection to http.kali.org:80.
HTTP request sent, awaiting response... 404 Not Found
2017-04-20 10:06:23 ERROR 404: Not Found.

--2017-04-20 10:06:23-- http://http.kali.org/kali/dists/kali-rolling/non-free/i18n/Translation-en_US.xz
Reusing existing connection to http.kali.org:80.
HTTP request sent, awaiting response... 404 Not Found
2017-04-20 10:06:23 ERROR 404: Not Found.

--2017-04-20 10:06:23-- http://http.kali.org/kali/dists/kali-rolling/non-free/i18n/Translation-en.xz
Reusing existing connection to http.kali.org:80.
HTTP request sent, awaiting response... 404 Not Found
2017-04-20 10:06:23 ERROR 404: Not Found.

FINISHED --2017-04-20 10:06:23--
Total wall clock time: 6.3s
Downloaded: 1 files, 30K in 0.3s (87.9 KB/s)

Method 2 using apt-offline from https://blog.sleeplessbeastie.eu/2014/01/30/how-to-manage-packages-on-an-off-line-debian-system/. I get similar output as above, I can post if needed.

The output file/signature file in both cases gives packages in the .xz format

My /etc/apt/sources.list file has:

deb http://http.kali.org/kali kali-rolling main contrib non-free
deb-src http://http.kali.org/kali kali-rolling main contrib non-free
As it says I should here

http://docs.kali.org/general-use/kali-linux-sources-list-repositories

uname -a


Linux debian 4.6.0-kali1-686-pae #1 SMP Debian 4.6.4-1kali1 (2016-07-21) i686 GNU/Linux



Q1. The repositories don't have the xz format, only the gz format, so why is apt-get update looking for xz files? Is that why I'm getting the 404 not found message?

Q2. I can download manually, but would rather not, is there an alternative?

Q3. None of the i18n directories exist in the repositories, searching suggests these are locale and language settings, are they important/required for an update?