Jump to content

Ubuntu: Proxy Socks --- Synaptic problems


IFT Student

Recommended Posts

Hi Student . . . here is the homework for tomorrow, you can work on this before I get online at the usual hour.I have been researching the problem . . . and everywhere I look I get to see the default port for this is 8080. So please try the 8080Could you edit the proxy file to

Acquire::http::Proxy "http://10.1.1.10:8080/";
( including the slash after the 8080 )If this still fails . . . . There also seems to be another way . . . but then we first have to move the /etc/apt/apt.conf.d/proxy out of the way:
$ sudo mv /etc/apt/apt.conf.d/proxy /etc/apt/apt.conf.d/proxy-BACKUP

Then open the /etc/apt/apt.conf file and add these lines:

ACQUIRE {http::proxy "http://10.1.1.10:8080/"}
The info comes from a thread with the exact same schoolnetwork/proxy setup:http://ubuntuforums.org/showpost.php?p=541276And apparently after fixing apt-get we will have to fix "wget" too in order to be able to use "automatix". ( automatix is where the "clever packages" come from B) ):locked: Bruno
Link to comment
Share on other sites

Ok seems like I have some work to do tomorrow as if I already didnt have enough homework ;)Thank you for the help and I will reply tomorrow morning about 8:30 EST with the results of our new tests :thumbsup: Thank you

Link to comment
Share on other sites

Bruno's "Automatix link" sure looks good (now please bear in mind that I'm NOT an expert with these things).I did some digging... on Finnish Ubuntu Forum, there was a similar case, and a PARTIAL solution:( http://forum.ubuntu-fi.org/index.php?topic=1943.0 )By using "declare" command, you can set the "proxy info" for apt-get. NOTE: apt-get only, not Synaptic. And these settings don't "survive" a reboot. But here goes:

$ declare http_proxy=http://server:gate/$ echo $http_proxy http://server:gate/$ declare ftp_proxy=http://server:gate/$ echo $ftp_proxy http://server:gate/$ export ftp_proxy$ export http_proxy

(server=your server's ip address á la "10.0.0.7", gate=gate number) But as I said: try Bruno's above "Automatix link" first... looks promising.

The computer is a Hewlett Packard XE743 with 20 gb HDD and 64Mb Ram...
I Googled for the "professor"... a 600MHz Celeron... you can live with that... but 64Mb Ram... it's a wonder that it works at all. :thumbsup: Edited by Urmas
Link to comment
Share on other sites

Last Thing FirstTo Urmas, It actually runs very smoothly at the moment well it did run extremely well with Windows 98 on it. Almost as fast as our Ubuntu machine. However I finally just put DSL on it and thats working for now. Thank you for the help on the 'declare' command.To Bruno,Changing the proxy file to port 8080 gave no new resultsThis is what we got.

http://security.ubuntu.com/ubuntu/dists/edgy-security/Release.gpg: Connection failedhttp://security.ubuntu.com/ubuntu/dists/edgy-security/main/i18n/Translation-en_US.bz2: Connection failedhttp://security.ubuntu.com/ubuntu/dists/edgy-security/restricted/i18n/Translation-en_US.bz2: Connection failedhttp://security.ubuntu.com/ubuntu/dists/edgy-security/main/binary-i386/Packages.gz: Connection failedhttp://security.ubuntu.com/ubuntu/dists/edgy-security/restricted/binary-i386/Packages.gz: Connection failedhttp://security.ubuntu.com/ubuntu/dists/edgy-security/main/source/Sources.gz: Connection failedhttp://security.ubuntu.com/ubuntu/dists/edgy-security/restricted/source/Sources.gz: Connection failed

Not sure if you remember but we removed all the url's so only these were used. Just to let everyone know thats why only 7 urls listed.And i moved the proxy file and then changed the apt.conf file and tried apt-get with these results

ift@ift-desktop:~$ sudo apt-get updateErr http://security.ubuntu.com edgy-security Release.gpg  Could not connect to 10.1.1.10:8080 (10.1.1.10). - connect (111 Connection refused)Err http://security.ubuntu.com edgy-security/main Translation-en_US  Could not connect to 10.1.1.10:8080 (10.1.1.10). - connect (111 Connection refused)Err http://security.ubuntu.com edgy-security/restricted Translation-en_US  Could not connect to 10.1.1.10:8080 (10.1.1.10). - connect (111 Connection refused)Failed to fetch http://security.ubuntu.com/ubuntu/dists/edgy-security/Release.gpg  Could not connect to 10.1.1.10:8080 (10.1.1.10). - connect (111 Connection refused)Failed to fetch http://security.ubuntu.com/ubuntu/dists/edgy-security/main/i18n/Translation-en_US.bz2  Could not connect to 10.1.1.10:8080 (10.1.1.10). - connect (111 Connection refused)Failed to fetch http://security.ubuntu.com/ubuntu/dists/edgy-security/restricted/i18n/Translation-en_US.bz2  Could not connect to 10.1.1.10:8080 (10.1.1.10). - connect (111 Connection refused)E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?ift@ift-desktop:~$

I thought we were there :(Of course we could be and I could be doing something wrong. I hope this helps and thank you for helping.I also went out on a limb and tried it with using port 1080 hoping that would bring different results.Here's what happened

ift@ift-desktop:~$ sudo apt-get updateErr http://security.ubuntu.com edgy-security Release.gpg  Connection failedErr http://security.ubuntu.com edgy-security/main Translation-en_US  Connection failedErr http://security.ubuntu.com edgy-security/restricted Translation-en_US  Connection failedIgn http://security.ubuntu.com edgy-security ReleaseIgn http://security.ubuntu.com edgy-security/main PackagesIgn http://security.ubuntu.com edgy-security/restricted PackagesIgn http://security.ubuntu.com edgy-security/main SourcesIgn http://security.ubuntu.com edgy-security/restricted SourcesErr http://security.ubuntu.com edgy-security/main Packages  Connection failedErr http://security.ubuntu.com edgy-security/restricted Packages  Connection failedErr http://security.ubuntu.com edgy-security/main Sources  Connection failedErr http://security.ubuntu.com edgy-security/restricted Sources  Connection failedFailed to fetch http://security.ubuntu.com/ubuntu/dists/edgy-security/Release.gpg  Connection failedFailed to fetch http://security.ubuntu.com/ubuntu/dists/edgy-security/main/i18n/Translation-en_US.bz2  Connection failedFailed to fetch http://security.ubuntu.com/ubuntu/dists/edgy-security/restricted/i18n/Translation-en_US.bz2  Connection failedFailed to fetch http://security.ubuntu.com/ubuntu/dists/edgy-security/main/binary-i386/Packages.gz  Connection failedFailed to fetch http://security.ubuntu.com/ubuntu/dists/edgy-security/restricted/binary-i386/Packages.gz  Connection failedFailed to fetch http://security.ubuntu.com/ubuntu/dists/edgy-security/main/source/Sources.gz  Connection failedFailed to fetch http://security.ubuntu.com/ubuntu/dists/edgy-security/restricted/source/Sources.gz  Connection failedE: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?ift@ift-desktop:~$

Thanks

Edited by IFT Student
Link to comment
Share on other sites

Good evening Student . . . . well, the results do not look good at all do they ?Just to be sure you have made the edit correctly in the /etc/apt/apt.conf, please show us

$ cat /etc/apt/apt.conf

Also, just asking again because it seems that other people are having success with the tweaks we did, are you 100% sure about the http://10.1.1.10 ?And:

Oh yea forgot to add this inWe are putting Xubuntu 6.10 on a personal computer that belongs to one of the students. We used a text based install or the alternate install because of the lack of resources available on their computer. The computer is a Hewlett Packard XE743 with 20 gb HDD and 64Mb Ram not sure on processor speed just listed something to the lines of "Family 7" or something cannot really remember sorry. Just wondering why it is sticking at 65% when installing selected software. The part it is particularly stuck on is "Configuring anthy." Can anyone shed any light on this situation as well
Sorry I missed that part of your post earlier in this thread . . . . . Indeed like Urmas says the 600MHz is not problem, but the 64MB RAM is.I think double the 64 MB and the installer will have less problems, the more RAM you can add, the better it is . . . 256 would be a real good start so you can even run the Gnome desktop once the install is finished. ( on 64MB you better try/test-run D Small Linux, it will do real fine and even have a nice GUI )B) Bruno
Link to comment
Share on other sites

Ok Last thing first, We broke down and installed DSL-N on the computer and it works fine.Here is what the apt.conf file looks like

ift@ift-desktop:~$ cat /etc/apt/apt.confACQUIRE {http::proxy "http://10.1.1.10:1080/"}ift@ift-desktop:~$

Thanks, hope this helpsOh yea, 10.1.1.10 is the address for our proxy server and we do use port 1080

Edited by IFT Student
Link to comment
Share on other sites

Ok Last thing first, We broke down and installed DSL-N on the computer and it works fine.
Good move . . . that is an excellent distro for that system ! . . . . Now just curious does the MyDSL package management work on that system ?? ( uses apt-get too :lol: )Okay, now the Ubuntu system . . . you indeed did the change of the /etc/apt/apt.conf correct ! . . . So if that does not help we will have to remove the lines you added again ( sorry, we need a clean slate ) and try another trick:First I would like to se a root-password, that will make that we will not have to use "sudo" at every command
$ sudo passwd

After we have a rootpassword ( please do not forget it B) ) you can do:

$ su<password># export ftp_proxy=http://10.1.1.10:1080/# export http_proxy=http://10.1.1.10:1080/# apt-get update

( you do not type the #, it is part of the prompt and shows you you are "root", you log out from "root" in the terminal by pressing Ctrl+D )Crossing my fingers real hard !NOTE: the "export" we do will only last until the next reboot so we do not make any real changes to the system.:D Bruno

Link to comment
Share on other sites

Ok, for the DSL system, Everything works because at home I use direct connection so no problems there.I set the root password and then tried the export commands and not sure if did this right but these are the results

ift@ift-desktop:~$ suPassword: root@ift-desktop:/home/ift# export ftp_proxy=http://10.1.1.10:1080/root@ift-desktop:/home/ift# export http_proxy=http://10.1.1.10:1080/root@ift-desktop:/home/ift# apt-get updateErr http://security.ubuntu.com edgy-security Release.gpg  Connection failedErr http://security.ubuntu.com edgy-security/main Translation-en_US  Connection failedErr http://security.ubuntu.com edgy-security/restricted Translation-en_US  Connection failedIgn http://security.ubuntu.com edgy-security ReleaseIgn http://security.ubuntu.com edgy-security/main PackagesIgn http://security.ubuntu.com edgy-security/restricted PackagesIgn http://security.ubuntu.com edgy-security/main SourcesIgn http://security.ubuntu.com edgy-security/restricted SourcesErr http://security.ubuntu.com edgy-security/main Packages  Connection failedErr http://security.ubuntu.com edgy-security/restricted Packages  Connection failedErr http://security.ubuntu.com edgy-security/main Sources  Connection failedErr http://security.ubuntu.com edgy-security/restricted Sources  Connection failedFailed to fetch http://security.ubuntu.com/ubuntu/dists/edgy-security/Release.gpg  Connection failedFailed to fetch http://security.ubuntu.com/ubuntu/dists/edgy-security/main/i18n/Translation-en_US.bz2  Connection failedFailed to fetch http://security.ubuntu.com/ubuntu/dists/edgy-security/restricted/i18n/Translation-en_US.bz2  Connection failedFailed to fetch http://security.ubuntu.com/ubuntu/dists/edgy-security/main/binary-i386/Packages.gz  Connection failedFailed to fetch http://security.ubuntu.com/ubuntu/dists/edgy-security/restricted/binary-i386/Packages.gz  Connection failedFailed to fetch http://security.ubuntu.com/ubuntu/dists/edgy-security/main/source/Sources.gz  Connection failedFailed to fetch http://security.ubuntu.com/ubuntu/dists/edgy-security/restricted/source/Sources.gz  Connection failedReading package lists... DoneE: Some index files failed to download, they have been ignored, or old ones used instead.root@ift-desktop:/home/ift#

Sorry I am getting confused but thank you

Link to comment
Share on other sites

Well, this is starting to look pretty desperate . . . you issued the commands correctly, but the results are still the same depressing errors.We tried 3 different ways to get apt-get to act nice . . . . I don't understand why it still does not work.B) Bruno

Link to comment
Share on other sites

Well your help is deeply appreciated. The only reason we installed Linux to begin with was to see another side of web programming. I have heard rumors on some forums that the OS does not have a way to configure Synaptic to work with Socksv4 through proxy server. Don't get disheartened your wisdom in this matter has greatly helped our class in better understanding Linux. Is there another distro you would recommend that might possibly not cause as many problems with our proxy server. If not that is fine as well. Once again we greatly greatly appreciate the help you have given us and will probably be back soon with more questions :)Yes urmas, I also tried the alternate you gave me. This also showed similar results. Thank you for the help offered. Once again I guess more digging is necessary. B)

Link to comment
Share on other sites

I would download a few LiveCD's so you can test the download feature of their package management:- D Small Linux ( maybe here the tweaks we tried above have better results ? )- Mandriva One ( uses "urpmi" you can set to use crul or wget ) ( you could also download the updates to CD at home and bypass the proxy by installing them from the CD )- PCLinuxOS ( uses both urpmi and apt-get but is better configurable )- Fedora ( there is a LiveCD but I forgot the name, uses "YUM" as package manager )- VectorLinux . . . suited for older hardware, but also very nice and stable on new hardware. Based on Slackware. ( has several options for package management like Swaret )So there you have a more basic apt-get, urpmi, yum and swaret. All 4 are completely different package managers.:D BrunoPS: I just hate it when we do not find a solution . . we do like happy endings B) :lol:

Link to comment
Share on other sites

One minor correction... PCLos does not use urpmi. In fact there was a pretty good debate about it in the mailing list recently. ;)Adam
You're right . . . it is rpm and not urpmi . . . . . sorry.B) Bruno
Link to comment
Share on other sites

I just checket the swaret.conf in my Slackware install and "swaret"( package manager for Slackware ) has config lines for proxy.You can make it use both wget or rsync, here is a quote of the /etc/swaret.conf

# If you want HTTP or FTP Proxy Support,# uncomment and Setup the following Variable:## WGET_PROXY=http://IP or HOST:PORT## If you want RSYNC Proxy Support,# uncomment and Setup the following Variable:## RSYNC_PROXY=IP or HOST:PORT#### /etc/swaret.conf - SWARET EXAMPLE CONFIGURATION FILE ###
I would have high hopes on the rsync option.So better add Slackware to the list too. It is one of the most pure Linux distibutions and sure for teaching/learning Linux there is no better one around.( VectorLinux I mentioned above is based on Slack but is more user-friendly because it has GUI config tools . . . so the choice is up to you: get the real Slack or the easy Vec. );) Bruno
Link to comment
Share on other sites

To Bruno, We are seriously considering Slackware 11 and the simplicity of the conf file is making it sound even better. One quick quick question for you, just wanting to make sure. Is there support for Socksv4 in there or could it possibly be another problem. Here is another question for you however. Could we just possibly go and manually download all of the files necessary and just bypass Synaptic and apt-get. We really only want things that relate to Web development anyway, mainly the Perl app and such. Thank you for everything.To Teacher, Not sure if I know you. It is highly unlikely, however, according to the location you provided only a state to the left...good ole' Tennessee is my humble residence.To Anyone Else, Would just like to thank everyone who has helped me with this issue. Even though the problem wasn't fixed, it still may have been a happy ending. Learning a lesson and moving on is I think, the happiest ending there can be in a situation like this.

Edited by IFT Student
Link to comment
Share on other sites

Hi IFT StudentYou are very welcome, always glad to help, that is what we are here for :)Okay, now to your question: "Could we just possibly go and manually download all of the files necessary and just bypass Synaptic and apt-get." . . . . Yes you can. And here is the basic command for installing a .deb file:

# dpkg -i name_of_package.deb

othere commands that can help are: "# dpkg --info name_of_package.deb"this will give you info on the package you downloaded. "# dpkg --help" will show you the options you can use with the dpkg command.You can find packages for Edgy here: http://packages.ubuntulinux.org/edgy/Now, if you have more files you download and want to install you might want to do set up a local directory with all the packages, replace the /etc/apt/sources.list file with one that points to the local directory ( maybe with all the updates ? ) and the you can use "apt-get update"/ "apt-get upgrade" to install all the updates with just one command. ( or install additional packages from the local directory.Because the sources.list will only have the local directory as source apt-get or synaptic will not have to go on the internet so will have no problems. :)Here are the commands to set up the local directory:

# mkdir /usr/local/debian# mv /some/where/package.deb /usr/local/debian# dpkg-scanpackages /usr/local/debian /dev/null | gzip - > /usr/local/debian/Packages.gz# echo "deb file:/usr/local/debian ./" > /etc/apt/sources.list

NOTES:- /usr/local/debian is a directory only root can move files to . . so that is why the mv command has to be given as root ( downloading is done as user, best make a "downloads" directory in your /home )- The last command will replace all the lines in the /etc/apt/sources.list with just one line pointing to /usr/local/debian ( the directory that holds all the .deb packages )- If the above says it is missing a package it most likely could be "dpkg-dev" ;)Hope this gives you the info you were after.:) Bruno

Link to comment
Share on other sites

Yes it does give me the information necessary. Looks like this is a task set for Monday morning. We greatly appreciate everything you have done. The instructor was so pleased with our enthusiasm over Linux that she decided to get involved. Now we are downloading Slackware 11.0 to install on another computer. There might possibly be another thread soon involving questions about Slackware :happyroll: :)

Edited by IFT Student
Link to comment
Share on other sites

You will like Slackware . . . but please note that after the install it will NOT boot into a GUI automatically . . . you have to login as user and type "startx"There is a good thread on how to install Slackware ( any version, with screenshots ) here: http://www.bitbenderforums.com/forums/showthread.php?t=60154After the install there are a few standard tweaks to make, see:Slackware Tips 1 Slackware Tips 2 Slackware Tips 3 Slackware Tips 4( Sure the same tips are also on http://brunolinux.com and/or the "offilne-tips" ):) Bruno

Link to comment
Share on other sites

Thank you for the tips Bruno, We already downloaded a version of slackware from an "easynews"mirror and the install was unsuccessful. We are now downloading slackware from another mirror. The only problem we had during the last install attempt was a "corrupt package" error. Hopefully, this download will not render the same results. The install seems pretty simple and yes we used bitbenderforums on the last install also. Thank you once again for the help and I'm sure there wlil be many more questions coming.

Link to comment
Share on other sites

To Teacher, Not sure if I know you. It is highly unlikely, however, according to the location you provided only a state to the left...good ole' Tennessee is my humble residence.
Aha! I had dinner with someone a week ago that was a student finishing a degree in web design and he was asking lots of Linux questions and I referred him to the forum. It is funny how similar the situations are. I had to wonder but you sound more up on Linux and I was scratching my head trying to match you with him. :D
Link to comment
Share on other sites

Ha that is a peculiar coincidence. However, I don't quite think I sound "up" on anything. Linux is a completely new learning process for me. Thank you for the compliment but I am nowhere near the capacity of many many people in this forum. Only here to learn as much as I can. :whistling:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...