LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   I cannot apt-get, or wget anything (https://www.linuxquestions.org/questions/ubuntu-63/i-cannot-apt-get-or-wget-anything-831452/)

Daravon 09-10-2010 03:56 PM

I cannot apt-get, or wget anything
 
I'm typing this on my linux laptop, at work. My Firefox works fine, but I cannot apt-get, or wget anything.

To get my Firefox to work, I just went into the Firefox preferences, checked "Automatic proxy configuration URL" and entered the url that I have. Now Firefox works fine, but the rest of my system does not.

There seems to be a similar setting in System>Preferences>Network Proxy. There is check box for "Automatic proxy configuration" and a field for a "Autoconfiguration URL". I put the same URL that put into Firefox here and told it to apply it system-wide, but my apt still does not work. This is a big deal because I need to install software and I really don't want to start manually downloading packages, plus I need ssh.

I have googled extensively on how to get apt to work from behind a proxy, but nothing seems to be working. I don't have a specific proxy server and port; rather I have some kind of autoconfiguration URL. Plus, my system has no /etc/apt.conf file at all.

Any ideas on how I can get my system to be able to access the internet? It's very strange to me that Firefox can, but apt, ping, wget, etc cannot.

traene 09-10-2010 06:01 PM

Not sure if this helps, but you can try and set the following variables in your ~/.bashrc or ~/.bash_profile:

export http_proxy=http://USER:PASS@http://proxy.example.com:PORT
export https_proxy=http://USER:PASS@http://proxy.example.com:PORT
export ftp_proxy=http://USER:PASS@http://proxy.example.com:PORT

export HTTP_PROXY=$http_proxy
export HTTPS_PROXY=$https_proxy
export FTP_PROXY=$ftp_proxy

tommcd 09-10-2010 09:19 PM

Quote:

Originally Posted by Daravon (Post 4093862)
Any ideas on how I can get my system to be able to access the internet? It's very strange to me that Firefox can, but apt, ping, wget, etc cannot.

For installing software open up Synaptic Package Manager. Under: settings > preferences > network, there is an option to select Manual proxy configuration. Try entering your proxy info there. Then click the reload button on synaptic. If your proxy is set correctly you should now be able to install updates and new software.
For wget, see post #6 here:
http://www.linuxquestions.org/questi...-proxy-276075/
Hope this helps.

Daravon 09-11-2010 08:49 AM

How can I find out my proxy information? I have the string that I entered into firefox that made firefox work, but entering that same string into the synaptic settings, and doing the 'export' thing, does not work when I use the same string. I've already tried. The thing is, the proxy information that I have does not have a port. So when people say to enter "export ftp_proxy=http://USER:PASS@http://proxy.example.com:PORT", well, I know USER, I know PASS, I know a proxy URL, but I have no idea what PORT means.

Kenny_Strawn 09-11-2010 10:36 AM

What are your repository settings? What version of Ubuntu do you have? What kind of network connection do you have? These questions need to be answered.

repo 09-11-2010 10:39 AM

Quote:

I'm typing this on my linux laptop, at work. My Firefox works fine, but I cannot apt-get, or wget anything.
I would suggest to talk to the IT people at work.
Seems to me all traffic is blocked.

Kind regards

Daravon 09-11-2010 05:17 PM

How could all traffic be blocked, when I can use Firefox to browse the internet just fine? I don't understand that.


Quote:

What kind of network connection do you have? These questions need to be answered.
I don't know. I'm trying to connect at work and I don't know what their connection is like. I got connected just fine, but firefox didn't work until I pasted the proxy autoconfiguration URL into the field in Preferences. Now it works fine and I can surf the internet and visit websites and everything. But I still can't use apt. Clearly I need to tell my system to use that autoconfiguration URL, but I'm just trying to find out how.

Kenny_Strawn 09-12-2010 12:19 AM

Is it wired or wireless?

repo 09-12-2010 03:03 AM

Quote:

How could all traffic be blocked, when I can use Firefox to browse the internet just fine? I don't understand that.
All traffic is routed via a proxy.
Again, talk to the IT people, they have restrictions for a reason.

Kind regards

Daravon 09-13-2010 10:56 AM

The connection is wireless.

The IT people provide the autoconfiguration URL already; it seems like all I need to do is know how to use it with my system. They do not officially support Linux either so I can't officially ask them to help me even.

repo 09-13-2010 11:18 AM

try this in /etc/apt/apt.conf,
Code:

Acquire::http::Proxy "http://MYDOMAIN\MYNAME:MYPASS@MY.PROXY.COM:MYPORT"

Kind regards


All times are GMT -5. The time now is 04:48 AM.