LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 12-12-2018, 03:17 PM   #1
lxx
LQ Newbie
 
Registered: Dec 2018
Posts: 4

Rep: Reputation: Disabled
Error when use apt-mirror from hard disk


I want to install some things offline from hard disk but I get errors at the offline computer and an installation of software is not possible.

1: The config file of apt-mirror:
Code:
############# config ##################
#
# set base_path    /var/spool/apt-mirror
#
# set mirror_path  $base_path/mirror
# set skel_path    $base_path/skel
# set var_path     $base_path/var
# set cleanscript $var_path/clean.sh
# set defaultarch  <running host architecture>
# set postmirror_script $var_path/postmirror.sh
# set run_postmirror 0
set nthreads     20
set _tilde 0
#
############# end config ##############

deb http://ftp.de.debian.org/debian/ stretch main contrib non-free
2: Then I run apt-mirror:
Code:
root@notebook:~# apt-mirror
Downloading 30 index files using 20 threads...
Begin time: Wed Dec 12 01:17:44 2018
[20]... [19]... [18]... [17]... [16]... [15]... [14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]... 
End time: Wed Dec 12 01:17:57 2018

Processing translation indexes: [T]

Downloading 38 translation files using 20 threads...
Begin time: Wed Dec 12 01:17:57 2018
[20]... [19]... [18]... [17]... [16]... [15]... [14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]... 
End time: Wed Dec 12 01:18:04 2018

Processing DEP-11 indexes: [D]

Downloading 12 dep11 files using 12 threads...
Begin time: Wed Dec 12 01:18:04 2018
[12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]... 
End time: Wed Dec 12 01:18:12 2018

Processing indexes: [P]

60.1 GiB will be downloaded into archive.
Downloading 51644 archive files using 20 threads...
Begin time: Wed Dec 12 01:18:14 2018
[20]... [19]... [18]... [17]... [16]... [15]... [14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]... 
End time: Wed Dec 12 05:57:50 2018

0 bytes in 0 files and 0 directories can be freed.
Run /var/spool/apt-mirror/var/clean.sh for this purpose.

Running the Post Mirror script ...
(/var/spool/apt-mirror/var/postmirror.sh)

Post Mirror script has completed. See above output for any possible errors.
3: I copy the Folder to a hard disk.

4: sources.list at offline computer:
Code:
deb file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian/ stable main contrib non-free
5: I Try:
Code:
apt clean
apt update
And now the output and the errors:

Code:
root@debian:~# apt clean
root@debian:~# apt update
Get:1 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch InRelease
Ign:1 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch InRelease
Err:2 http://deb.debian.org/debian stretch InRelease
  Could not resolve 'deb.debian.org'
Get:3 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch Release [118 kB]
Get:3 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch Release [118 kB]
Get:4 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch Release.gpg [2434 B]
Get:4 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch Release.gpg [2434 B]
Get:5 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/main amd64 Packages [7089 kB]
Ign:5 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/main amd64 Packages
Get:6 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/main Translation-en [5388 kB]
Ign:6 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/main Translation-en
Get:7 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/contrib amd64 Packages [50.9 kB]
Ign:7 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/contrib amd64 Packages
Get:8 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/contrib Translation-en [45.9 kB]
Ign:8 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/contrib Translation-en
Get:9 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/non-free amd64 Packages [78.6 kB]
Ign:9 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/non-free amd64 Packages
Get:10 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/non-free Translation-en [80.4 kB]
Ign:10 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/non-free Translation-en
Get:5 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/main amd64 Packages [7089 kB]
Ign:5 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/main amd64 Packages
Get:6 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/main Translation-en [5388 kB]
Ign:6 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/main Translation-en
Get:7 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/contrib amd64 Packages [50.9 kB]
Ign:7 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/contrib amd64 Packages
Get:8 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/contrib Translation-en [45.9 kB]
Ign:8 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/contrib Translation-en
Get:9 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/non-free amd64 Packages [78.6 kB]
Ign:9 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/non-free amd64 Packages
Get:10 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/non-free Translation-en [80.4 kB]
Ign:10 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/non-free Translation-en
Get:5 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/main amd64 Packages [9488 kB]
Ign:5 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/main amd64 Packages
Get:6 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/main Translation-en [26.5 MB]
Err:6 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/main Translation-en
  File not found - /media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian/dists/stretch/main/i18n/Translation-en (2: No such file or directory)
Get:7 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/contrib amd64 Packages [61.2 kB]
Reading package lists... Done       
N: Download is performed unsandboxed as root as file '/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian/dists/stretch/InRelease' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
W: Failed to fetch http://deb.debian.org/debian/dists/stretch/InRelease  Could not resolve 'deb.debian.org'
E: Failed to fetch file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian/dists/stretch/main/i18n/Translation-en  File not found - /media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian/dists/stretch/main/i18n/Translation-en (2: No such file or directory)
W: Some index files failed to download. They have been ignored, or old ones used instead.

does anyone have an idea where the problem could be?
Thank you

Last edited by lxx; 12-12-2018 at 07:13 PM. Reason: change language to LC_ALL=C
 
Old 12-12-2018, 06:01 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
I only see one error: /media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian/dists/stretch/main/i18n/Translation-en doesn’t exist. Try to find out why it wasn’t mirrored.

Also, debian.org is not accessible, but this is expected if you are offline. I don’t know why apt update tries to access it though.

By the way, many but not all LQ members speak German. You get limited feedback. Better set LANG=C and generate English error messages.
 
Old 12-12-2018, 07:03 PM   #3
lxx
LQ Newbie
 
Registered: Dec 2018
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
I only see one error: /media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian/dists/stretch/main/i18n/Translation-en doesn’t exist. Try to find out why it wasn’t mirrored.
That is strange, i check this and the file Translation-en exists in the directory: Translation-en.bz2

Quote:
Originally Posted by berndbausch View Post
Also, debian.org is not accessible, but this is expected if you are offline. I don’t know why apt update tries to access it though.
I dont know too, in the offline sources.list only is "file:"


Quote:
Originally Posted by berndbausch View Post
Better set LANG=C and generate English error messages.
Thank you for the note!
Once again with export LC_ALL=C:

Code:
root@debian:~# apt clean
root@debian:~# apt update
Get:1 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch InRelease
Ign:1 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch InRelease
Err:2 http://deb.debian.org/debian stretch InRelease
  Could not resolve 'deb.debian.org'
Get:3 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch Release [118 kB]
Get:3 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch Release [118 kB]
Get:4 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch Release.gpg [2434 B]
Get:4 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch Release.gpg [2434 B]
Get:5 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/main amd64 Packages [7089 kB]
Ign:5 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/main amd64 Packages
Get:6 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/main Translation-en [5388 kB]
Ign:6 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/main Translation-en
Get:7 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/contrib amd64 Packages [50.9 kB]
Ign:7 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/contrib amd64 Packages
Get:8 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/contrib Translation-en [45.9 kB]
Ign:8 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/contrib Translation-en
Get:9 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/non-free amd64 Packages [78.6 kB]
Ign:9 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/non-free amd64 Packages
Get:10 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/non-free Translation-en [80.4 kB]
Ign:10 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/non-free Translation-en
Get:5 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/main amd64 Packages [7089 kB]
Ign:5 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/main amd64 Packages
Get:6 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/main Translation-en [5388 kB]
Ign:6 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/main Translation-en
Get:7 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/contrib amd64 Packages [50.9 kB]
Ign:7 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/contrib amd64 Packages
Get:8 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/contrib Translation-en [45.9 kB]
Ign:8 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/contrib Translation-en
Get:9 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/non-free amd64 Packages [78.6 kB]
Ign:9 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/non-free amd64 Packages
Get:10 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/non-free Translation-en [80.4 kB]
Ign:10 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/non-free Translation-en
Get:5 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/main amd64 Packages [9488 kB]
Ign:5 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/main amd64 Packages
Get:6 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/main Translation-en [26.5 MB]
Err:6 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/main Translation-en
  File not found - /media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian/dists/stretch/main/i18n/Translation-en (2: No such file or directory)
Get:7 file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian stretch/contrib amd64 Packages [61.2 kB]
Reading package lists... Done       
N: Download is performed unsandboxed as root as file '/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian/dists/stretch/InRelease' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
W: Failed to fetch http://deb.debian.org/debian/dists/stretch/InRelease  Could not resolve 'deb.debian.org'
E: Failed to fetch file:/media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian/dists/stretch/main/i18n/Translation-en  File not found - /media/root/HDD/apt-mirror/mirror/ftp.de.debian.org/debian/dists/stretch/main/i18n/Translation-en (2: No such file or directory)
W: Some index files failed to download. They have been ignored, or old ones used instead.
And when I try to install for example amarok:

Code:
root@debian:~# apt install amarok
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package amarok

Last edited by lxx; 12-12-2018 at 07:06 PM.
 
Old 12-12-2018, 08:05 PM   #4
lxx
LQ Newbie
 
Registered: Dec 2018
Posts: 4

Original Poster
Rep: Reputation: Disabled
I have now a solution: when I copy the mirror (all the data) from the external hard drive to the system hard drive, then it works!
apt seems to have a problem with the external hard drive as a source!
Of course it is a bit impractical to copy the whole mirror onto the system disk, but it works...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error in the mirror created with apt-mirror ?? abd_bela Ubuntu 2 10-20-2015 07:12 AM
[SOLVED] Problems with Debootstrap and apt-mirror-based Debian mirror lil_drummaboy Debian 3 06-22-2010 06:12 PM
apt-mirror doesn't create appropriate mirror ??? abd_bela Debian 1 09-30-2009 04:23 PM
LXer: How To Create A Local Debian/Ubuntu Mirror With apt-mirror LXer Syndicated Linux News 0 01-04-2007 05:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 12:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration