2

i tried to install flex and bison but i got this error : can not locate the file & also i use software center to do this but authenticate error occur.

i don't know which resource i should choose. when i run this command in terminal:

sudo apt-get update

this is the result:

Failed to fetch http://archive.canonical.com/dists/lucid/Release.gpg  Unable to connect to 127.0.0.1:8080:

My environment:

$ cat /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
http_proxy="http://127.0.0.1:8080/"
https_proxy="https://127.0.0.1:8080/"
ftp_proxy="ftp://127.0.0.1:8080/"
socks_proxy="socks://127.0.0.1:8080/"

$ /etc/apt/apt.conf
Acquire::http::proxy "http://127.0.0.1:8080/";
Acquire::https::proxy "https://127.0.0.1:8080/";
Acquire::ftp::proxy "ftp://127.0.0.1:8080/";
Acquire::socks::proxy "socks://127.0.0.1:8080/";
zara-T
  • 35

2 Answers2

3

If your distribution is Ubuntu Lucid.

Test this:

Open a terminal,

Press Ctrl+Alt+T

Run it:

sudo -i
nano /etc/apt/sources.list

In the open file, delete the content and paste this:

## Uncomment the following two lines to fetch updated software from the network
deb http://old-releases.ubuntu.com/ubuntu lucid main restricted
deb-src http://old-releases.ubuntu.com/ubuntu lucid main restricted

## Uncomment the following two lines to fetch major bug fix updates produced
## after the final release of the distribution.
deb http://old-releases.ubuntu.com/ubuntu lucid-updates main restricted
deb-src http://old-releases.ubuntu.com/ubuntu lucid-updates main restricted

## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://old-releases.ubuntu.com/ubuntu lucid universe
deb-src http://old-releases.ubuntu.com/ubuntu lucid universe

deb http://old-releases.ubuntu.com/ubuntu lucid-security main restricted
deb-src http://old-releases.ubuntu.com/ubuntu lucid-security main restricted

deb http://old-releases.ubuntu.com/ubuntu lucid-security universe
deb-src http://old-releases.ubuntu.com/ubuntu lucid-security universe

deb http://old-releases.ubuntu.com/ubuntu lucid multiverse
deb-src http://old-releases.ubuntu.com/ubuntu lucid multiverse

deb http://old-releases.ubuntu.com/ubuntu lucid-backports main restricted universe multiverse

Ctrl + O, save file. Ctrl + X, close nano.

Continue run in a terminal:

sudo -i
apt-get update
apt-get dist-upgrade
apt-get install flex bison
apt-get clean

If your distribution is not Ubuntu Lucid, change Lucid to appropriate name.

If none of this works

Download packages (Lucid):

http://mirrors.kernel.org/ubuntu/pool/main/b/bison/bison_2.4.1.dfsg-3_i386.deb (32 bit) http://mirrors.kernel.org/ubuntu/pool/main/b/bison/bison_2.4.1.dfsg-3_amd64.deb (64 bit) http://mirrors.kernel.org/ubuntu/pool/main/f/flex/flex_2.5.35-9_i386.deb (32 bit) http://mirrors.kernel.org/ubuntu/pool/main/f/flex/flex_2.5.35-9_amd64.deb (64 bit)

And install them with:

sudo -i
cd /home/user/Downloads
dpkg -i *.deb
kyodake
  • 15,401
0

For some reason, you have proxy settings configured. Assuming you don't need them, open System Settings, go to the Network section, set Proxy settings to None and click Apply system wide:

enter image description here

muru
  • 197,895
  • 55
  • 485
  • 740
  • i do that but i got this error:

    Package flex is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

    E: Package 'flex' has no installation candidate

    – zara-T Dec 07 '14 at 14:30