Trying to import packages from /var/cache/apt-cacher/import

Bug #1178937 reported by ajack38
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt-cacher (Ubuntu)
New
Undecided
Unassigned

Bug Description

ashley@ashley-laptop:~$ sudo /usr/share/apt-cacher/apt-cacher-import.pl
[sudo] password for ashley:
Undefined subroutine &main::inet_aton called at /usr/share/apt-cacher/lib/apt-cacher.pl line 221.
ashley@ashley-laptop:~$ apt-cacher -v
/usr/sbin/apt-cacher: Version 1.7.3

ashley@ashley-laptop:~$ lsb_release -rd
Description: Ubuntu 12.04.2 LTS
Release: 12.04

I expected it to import the .deb's that I placed in /var/cache/apt-cacher/import

It provided the error at the start.

Tags: apt-cacher
tags: added: apt-cacher
Revision history for this message
TheCompWiz (thecompwiz) wrote :

Found the problem... The "Socket" library is not included... and the function inet_aton is called (part of Socket).

Simply add:

use Socket;

... on line 55 of /usr/share/apt-cacher/apt-cacher-import.pl

Revision history for this message
Dawid Bielecki (dawciobiel) wrote :

#
/usr/share/apt-cacher/apt-cacher-import.pl -l /var/cache/apt/archives
Invalid line in main configuration file /etc/apt-cacher/apt-cacher.conf: use\ Socket. Ignoring line
Undefined subroutine &main::inet_aton called at /usr/share/apt-cacher/lib/apt-cacher.pl line 245.

#
/usr/share/apt-cacher/apt-cacher-import.pl -l /var/cache/apt/archives
Invalid line in main configuration file /etc/apt-cacher/apt-cacher.conf: use\ Socket\;. Ignoring line
Undefined subroutine &main::inet_aton called at /usr/share/apt-cacher/lib/apt-cacher.pl line 245.

How to fix it?

Revision history for this message
Dawid Bielecki (dawciobiel) wrote :

update:
I was tired and ofc i updated wrong file. I should add "use Socket;" on:
 /usr/share/apt-cacher/lib/apt-cacher.pl

Now everything is working correctly.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.