PDA

View Full Version : Re apt-mirror


bluegrass
4th January 2007, 11:31
This is with regards to "How To Create A Local Debian/Ubuntu Mirror With apt-mirror"

After the configuration and I believe I was able to download all the necessary files (stable main contrib non-free), but when I tested it on my other newly configured server I get this error, after the "apt-get update" command.


W: Couldn't stat source package list http://192.168.0.211 sarge/main Packages (/var/lib/apt/lists/192.168.0.211_debian_dists_sarge_main_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://192.168.0.211 sarge/contrib Packages (/var/lib/apt/lists/192.168.0.211_debian_dists_sarge_contrib_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://192.168.0.211 sarge/non-free Packages (/var/lib/apt/lists/192.168.0.211_debian_dists_sarge_non-free_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://192.168.0.211 sarge/main Packages (/var/lib/apt/lists/192.168.0.211_debian_dists_sarge_main_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://192.168.0.211 sarge/contrib Packages (/var/lib/apt/lists/192.168.0.211_debian_dists_sarge_contrib_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://192.168.0.211 sarge/non-free Packages (/var/lib/apt/lists/192.168.0.211_debian_dists_sarge_non-free_binary-i386_Packages) - stat (2 No such file or directory)
W: You may want to run apt-get update to correct these problems
E: Some index files failed to download, they have been ignored, or old ones used instead.


If I checked my local mirror on the internet browser I can actually access the folders: http://192.168.0.211/debian


Index of /debian/dists/stable/main

Icon Name Last modified Size Description[DIR] Parent Directory -
[DIR] binary-i386/ 04-Jan-2006 11:12 -

Apache/2.0.54 (Debian GNU/Linux) Server at 192.168.0.211 Port 80


When I make an NMAP to the local mirror from another server:


mail:/# nmap -P0 192.168.0.211

Starting nmap 3.81 ( http://www.insecure.org/nmap/ ) at 2007-01-04 17:24 PHT
Interesting ports on 192.168.0.211:
(The 1655 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
110/tcp open pop3
111/tcp open rpcbind
113/tcp open auth
143/tcp open imap
752/tcp open qrh
993/tcp open imaps
MAC Address: 00:00:00:00:00:00 (D-Link Systems)

Nmap finished: 1 IP address (1 host up) scanned in 3.726 seconds


is there something i missed?

By the way, when I did this command:

/bin/bash /var/spool/apt-mirror/var/clean.sh


there were no unnecessary files nor directories removed. Is this normal?

falko
5th January 2007, 16:47
I suggest you run
su - apt-mirror -c apt-mirror
again and check if there are any errors in the output.

komerad
31st October 2007, 13:45
Hi,

I have encountered this problem too. And it is barely documented this one comes pretty close to how I could describe the problem.

The problem is either :
a) apt (client) cannot handle packages on a vhost.
b) apt (client) has a problem with the symlinks

I haven't tested it much further yet to find out wich one is exactly causing the problem but this is how I solved it :

(a)
nano /etc/apache2/sites-available/default
Change :
RedirectMatch ^/$ /apache2-default/
to :
# RedirectMatch ^/$ /apache2-default/

(b)
As a mirror takes quiet a bit of space and is something you don't want to lose then its a good idea to have it on a seperate partition or even disk.
So :
mkdir /var/www/repositories
chown apt-mirror /var/www/repositories
mount /dev/[your mirror disk] /var/www/repositories
for future use :
nano /etc/apt/mirror.list
Change :
# set base_path /var/spool/....
on line :7
to :
set base_path /var/www/repositories/
when finished restart your webserver

Now change your clients sources list to search the new path.

As said : this way does probably more then is needed to fix the problem feel free to test it partitial and reply the method that does it alone :)

I also know that I'm a bit late with respons but I had this problem now and this forum came close to my search string so it will be usefull for others too.