LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   problems with apt-get, synaptic and proxy (https://www.linuxquestions.org/questions/ubuntu-63/problems-with-apt-get-synaptic-and-proxy-454026/)

ernesto_cgf 06-12-2006 10:25 AM

problems with apt-get, synaptic and proxy
 
I have declared my http_proxy and ftp_proxy variables succesfully (wget works just fine), and I also declared the

Code:

Acquire::http::Proxy "http://user:pwd@proxy:port";
Acquire::ftp::Proxy "ftp://user:pwd@proxy:port";

in the /etc/apt/apt.conf file.

apt-get works just fine, but synaptic gives me an error

Code:

http://au.archive.ubuntu.com/ubuntu/dists/dapper/main/binary-i386/Packages.gz: 407 Proxy Authentication Required
http://au.archive.ubuntu.com/ubuntu/dists/dapper/restricted/binary-i386/Packages.gz: 407 Proxy Authentication Required
http://au.archive.ubuntu.com/ubuntu/dists/dapper/universe/binary-i386/Packages.gz: 407 Proxy Authentication Required
http://au.archive.ubuntu.com/ubuntu/dists/dapper/multiverse/binary-i386/Packages.gz: 407 Proxy Authentication Required
http://au.archive.ubuntu.com/ubuntu/dists/dapper/universe/binary-i386/Packages.gz: 407 Proxy Authentication Required
http://au.archive.ubuntu.com/ubuntu/dists/dapper-updates/main/binary-i386/Packages.gz: 407 Proxy Authentication Required
http://au.archive.ubuntu.com/ubuntu/dists/dapper-updates/restricted/binary-i386/Packages.gz: 407 Proxy Authentication Required
http://au.archive.ubuntu.com/ubuntu/dists/dapper-updates/multiverse/binary-i386/Packages.gz: 407 Proxy Authentication Required
http://au.archive.ubuntu.com/ubuntu/dists/dapper-updates/universe/binary-i386/Packages.gz: 407 Proxy Authentication Required

Why is that I can work with apt-get in the command line, but I cannot work with synaptic's GUI? On the other hand, I would stay with apt-get all the time as I am not afraid of the CLI, but I have to go into synaptic to browse the repositories for things I might find useful. Is there a way to query from the CLI the repositories with keywords to be matched against package name and/or description? Can I query from the CLI the packages I have installed on my system? Perhaps something like

Code:

rpm -qa | grep something
Thanks in advance.

brianthegreat 06-12-2006 12:04 PM

Open up synaptic and then choose (settings--> preferences--> network) and then define your proxy settings there. All should be well after that has been completed in the proper fashion. Thne you will probably need to issue an sudo apt-get update but all should be fine after that.

ernesto_cgf 06-12-2006 12:22 PM

I was already aware of these synaptic settings to configure proxies, but it doesn't have the option of proxy authentication. I mean, there is not way to give a proxy username and a password. And unfortunately, my proxy needs authentication.

I put user:password@host in the host input field, but it still does not work.

brianthegreat 06-12-2006 12:47 PM

Found this with a quick search referencing www.google.com/linux

http://www.linuxforums.org/forum/deb...er-ubuntu.html

ernesto_cgf 06-12-2006 01:16 PM

It says I should include

Acquire::http::Proxy "http://username:password@proxy:port";
Acquire::ftp::Proxy "ftp://username:password@proxy:port";

in /etc/apt/apt.conf

I already said I did that. And I also configured the http_proxy and ftp_proxy environment variables used by wget, just in case (and because I use wget, or course).

Why does synaptic has a proxy configuration settings and it doesn't use the one in /etc/apt/apt.conf ???
My apt-get works great from the CLI, but synaptic does not.

foo_bar 07-14-2006 10:10 AM

Quote:

Originally Posted by ernesto_cgf
Why does synaptic has a proxy configuration settings and it doesn't use the one in /etc/apt/apt.conf ???
My apt-get works great from the CLI, but synaptic does not.

I've just installed ubuntu 6.06 LTS and have the same problem. It seems apt-get and synaptic just ignore the apt.conf file. Only setting http_proxy variable helps (tested only for apt-get). Synaptic nows about proxy, it connects to it, but the proxy requires authentication and synaptic fails to provide any credentials althrough I've set them in apt.conf and through System->Preferences->Network Proxy->Detail. It seems to me like a bug.

regards

foo_bar 07-17-2006 03:23 AM

Quote:

Originally Posted by foo_bar
I've just installed ubuntu 6.06 LTS and have the same problem. It seems apt-get and synaptic just ignore the apt.conf file. Only setting http_proxy variable helps (tested only for apt-get). Synaptic nows about proxy, it connects to it, but the proxy requires authentication and synaptic fails to provide any credentials althrough I've set them in apt.conf and through System->Preferences->Network Proxy->Detail. It seems to me like a bug.

Finally, It seems I've found the problem. When you set proxy address and credentials using System->Preferences->Network Proxy the system sets environmental variable http_proxy using only address settings (e.g: http_proxy="host:port") and ignores the credentials. The environmental variable overrides settings in apt.conf so when apt-get connects to the proxy without credentials it gets HTTP 407 error. The solution is to avoid setting proxy configuration using System->Preferences->Network Proxy and set proxy in apt.conf only.

regards

meravih 08-07-2006 08:31 PM

yeah ur trick worked...:)
thank you buddy.

darkmanta 09-26-2006 03:18 AM

broken
 
Quote:

Originally Posted by meravih
yeah ur trick worked...:)
thank you buddy.

It does not work for me...
any suggestion?

thnx

phoenix49 10-19-2006 01:34 AM

I placed domain\username in /etc/apt/apt.conf and in network proxy in GNOME (Ubuntu Edgy). apt-get work flawlessly, but Synaptic not. Anyway, I'm quite comfortable now :)

ernesto_cgf 10-19-2006 07:16 AM

I am quite used to manage software packages from the CLI. I've always have since my old Mandrake/urpmi days. But I still like to use a GUI to browse packages. Taht's why I want synaptic. I can browse packages now, but sometimes while browsing I am just a couple of clicks away from installing something cool I just found. And I cannot. I even have to close Synaptic in order to be able to work with apt-get in the terminal.

I know we have aptitute, but I still don't get how to work with its interface. I just don't understand it. I would be happy with a way to know if a package is installed or not. From the CLI I am able to browse the repositories with "apt-cache search" and "apt-cache show", but this doesn't tell me enough. In synaptic, packages are check-marked (or not) if they are already installed.

frootloop 04-30-2008 02:29 AM

apt-get works, synaptic does not - workaround
 
Hi there,

I ran into the same problem at work.
It looks like gksu is part of the problem.
as a work around, add your proxy to /etc/apt/apt.conf
adjust the network proxy under system-->preferences to your proxy setup.
Set synaptic up with no proxy.
start synaptic from the command line with sudo - sudo synaptic.
Voila! you can now use synaptic with yuor proxy!


All times are GMT -5. The time now is 10:59 PM.