Jump to content

Recommended Posts

Posted

Hello all,

 

Has anyone been able to connect to their Raspberry Pi's to the Network so that the 'sudo apt-get update' command works?

I have followed some advice found online which enables me to point the Raspberry Pi to the Cache box and it appears to work, however when I run the update I get about 6% through before it fails citing that it cannot connect to the mirror sites.

 

Is it a case that the address is being blocked by CLEO or have I missed something? Has anyone managed to connect the Raspberry Pi, who is still receiving their Internet connection through CLEO?

 

Thanks

 

Nick

Posted (edited)

 

Have you created /etc/apt/apt.conf to contain the line

 

Acquire::http::Proxy "http://proxy url:port";

 

(change as appropriate)?

Edited by mats
  • Thanks 1
Posted

I created a file in the following location

 

/etc/apt/apt.conf.d/10proxy

 

which contains the above piece of code. Should this be in another file?

Posted (edited)

I have configured the two files and still no joy. I found another thread that told me to put this command into the terminal prompt and this works

 

sudo apt-get -o Acquire::http::proxy="http://[i]proxyurl:port[/i]" update

 

I guess I just need to find the right file to input the Acquire command

Edited by plexer
Posted
Did you include a slash (/) at the end of the proxy url, after the port number, before the last ". If I remember correctly it wouldn't work for me until I added the slash at the end.
Posted (edited)

We did something that allows the kids to log-in with their username and connect to the proxy using their credentials

 

Alter the /home/pi/.profile so that when the Pi starts up, the pupil 'logs in' (not really, but it looks like it's logging in) and their user and password is set via export, then fires up the GUI with startx.

 

See if this is of help.

 

The additional code is shown in red text.

 

# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
   # include .bashrc if it exists
   if [ -f "$HOME/.bashrc" ]; then
    . "$HOME/.bashrc"
   fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
   PATH="$HOME/bin:$PATH"
fi
[color="#FF0000"]
clear
echo "Please enter your school username: "
read username
echo "Please enter your password: "
read -s password
export http_proxy="http://YOUR_DOMAIN\\$username:$password@YOUR_PROXY_SERVER:YOUR_PROXY_PORT/"
startx[/color]

Edited by jinnantonnixx
  • 10 months later...
Posted

Old thread I know but I just got this proxy stuff working on my Pi at school and thought I would post the steps I used to get it doing

 

OS: 2014-01-07-wheezy-raspbian

 

Launch LXTerminal

 

1. sudo nano /etc/apt/apt.conf.d/10proxy

 

2. Acquire::http::Proxy "http:\\yourpoxy:yourport\";

 

3. Ctrl X to exit - Press Y to save and press enter make sure the filename is 10proxy

 

4. Run sudo apt-get update and watch it update!

 

Note it is case sensitive and make sure to include the / after the proxy port and also the ; after the close quotations

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...