Archive for : September, 2015

Fix apt-get 404 Not Found Package Errors

Posting ini copas dari

If you’re using a normal version of Ubuntu such as Saucy, Raring, Quantal, Oneiric, Natty, Maverick, etc, you may have already (and will eventually) start getting “Failed to fetch 404 Not Found” errors when trying to run  aptget update , or even sometimes running aptget install , but fear not, it is easy to fix, and here’s how…

Why am I getting this error?

Normal Ubuntu releases are supported for 9 months, whereas LTS (Long Term Support) releases are supported for 5 years.  Once support is up for the version of Ubuntu you are using the repository is moved to another server and will no longer be available on the standard location.

Ubuntu Release Details

The most simple solution would be to upgrade to a newer version:

How can I fix it without upgrading?

Run this command below on your server and it will replace all of the  and package repository URLs with

For Linux Mint, run this command as well:

You may also want to see if there are other files in  /etc/apt/sources.list.d/  that need to be updated, which can be done with a simple grep command:

Now update apt-get sources:


Akses Internet Via CLI di Belakang Proxy

Posting ini copas dari

‘m behind a squid proxy server. How do I access internet via proxy server when I use wget, lynx and other utilities from a shell prompt on a Linux or Unix-like systems?

Linux and UNIX-like systems has environment variable called http_proxy. It allows you to connect text based session and/or applications via the proxy server. All you need is proxy server IP address (URL) and port values.

This variable is almost used by all utilities such as elinks, lynx, wget, curl and others commands.

Set http_proxy shell variable on Linux/OS X/Unix bash shell

Type the following command to set proxy server:
$ export http_proxy=http://server-ip:port/
$ export http_proxy=
$ export http_proxy=

If the proxy server requires a username and password then add these to the URL. For example, to include the username foo and the password bar:
$ export http_proxy=http://foo:bar@server-ip:port/
$ export http_proxy=http://foo:bar@
$ export http_proxy=

How do I setup proxy variable for all users?

To setup the proxy environment variable as a global variable, open /etc/profile file:
# vi /etc/profile
Add the following information:
export http_proxy=
export http_proxy=
Save and close the file.

A note about enabling proxy access to a specific user

To enable proxy access for a specific user, add the lines user shell profile. For the default bash shell, the profile is the file .bash_profile. For example, enable proxy access for a specifc user called vivek, type:
$ vi $HOME/.bash_profile
# vi /home/vivek/.bash_profile
Append the following line:
export http_proxy=
Save and close the file.

How do I use password protected proxy server using various command line options?

You can simply use wget command as follows:
$ wget --proxy-user=USERNAME --proxy-password=PASSWORD
Lynx command has the following syntax:
$ lynx -pauth=USER:PASSWORD
Curl command has following syntax:
$ curl --proxy-user user:password