0

I tried installing gfortran through command line. And the result is

premkr@premkr-Lenovo-ideapad-100-15IBD:~$ sudo wget gfortran
[sudo] password for premkr: 
--2016-10-29 01:07:36--  http://gfortran/
Connecting to 10.10.78.21:3128... connected.
Proxy request sent, awaiting response... 503 Service Unavailable
2016-10-29 01:07:36 ERROR 503: Service Unavailable.

Does it mean that my terminal has no internet access .My proxy works in firefox and there`s good connection.

2
  • What makes you think that sudo wget gfortran should install gfortran? To install via commandline from the repository, you probably want sudo apt-get install gfortran or sudo apt install gfortran. If that's not what you're trying to do then please edit your question to explain further. Oct 27, 2016 at 14:34
  • It`s not working sudo apt install gfortran Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package gfortran Nov 8, 2016 at 12:26

1 Answer 1

0

To have your terminal and wget have internet access through a proxy, you must edit the following files:

/etc/bash.bashrc
/etc/environment
/etc/wgetrc

Which must contain these parameters:

/etc/bash.bashrc

export http_proxy=http://username:[email protected]:port/
export https_proxy=http://username:[email protected]:port/
export ftp_proxy=http://username:[email protected]:port/

/etc/environment

http_proxy=http://username:[email protected]:port/
https_proxy=http://username:[email protected]:port/
ftp_proxy=http://username:[email protected]:port/

/etc/wgetrc:

http_proxy=http://username:[email protected]:port/
https_proxy=http://username:[email protected]:port/
ftp_proxy=http://username:[email protected]:port/
use_proxy = on

Edited 08-11-2016

To edit files, not directories, you must:

Open a terminal,

Press Ctrl+Alt+T

Run it:

exec sudo -i
nano /etc/bash.bashrc
nano /etc/environment
nano /etc/wgetrc

In order to add the aforementioned lines where:

username = your username for the proxy if it exists
password = your password for the proxy if it exists
proxyserver.net = name or IP address of the proxy
port = port number of the proxy
3

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .