On Ubuntu 12.04 or 14.04 with Unity, the following can break your Apt config.
In system --> preferences --> network proxy, enable Automatic proxy configuration >and enter the URL of the PAC.
Then press apply system wide, and that should do the trick.
The issue is that Apt has no concept of a "no_proxy" and so tries to send all traffic out this proxy. There are a couple ways to work around this, one is to create a specific override file for Apt telling it to use/ignore a proxy. Taken from https://superuser.com/questions/323488/ubuntu-system-wide-proxy-auto-configuration-pac-script
The other is after clicking Apply in the Network Proxy page, go edit the /etc/apt/apt.conf file as root
sudo gedit /etc/apt/apt.conf and remove any mentions of proxy in this file.