i don't know why i suddenly can't do something with apt-get such as sudo apt-get update or sudo apt-get install blabla

this is output for uname -a :

Linux adelleodel-X450CC 3.16.0-30-generic #40~14.04.1-Ubuntu SMP Thu Jan 15 17:43:14 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

file apt-get :

apt-get: ERROR: cannot open `apt-get' (No such file or directory)

cat /etc/lsb-release:


ls -l /usr/bin/apt-get :

ls: cannot access /usr/bin/apt-get: No such file or directory

dpkg -l apt :

| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                          Version             Architecture        Description
rc  apt                           1.0.1ubuntu2.11     amd64               commandline package manager

echo $PATH :


i've searched before about this and some people said that i have to download something and dpkg it. how to do it then? can someone give the link and step by step how to do it? Thanks a lot!!!!

-----editted----- actually, i did sudo apt-get remove libusb-0.1-4:amd64 and some package autoremove with it i think.. i did that because i thought it wasn't belong with my program,.. because i have libusb-1.0-0:amd64, libusb-1.0-0-dev:amd64, and libusb-1.0-doc

i've tried wget http://security.ubuntu.com/ubuntu/pool/main/a/apt/apt_1.0.1ubuntu2.11_amd64.deb

the result is :

--2016-02-08 19:56:19--  http://security.ubuntu.com/ubuntu/pool/main/a/apt/apt_1.0.1ubuntu2.11_amd64.deb
Resolving security.ubuntu.com (security.ubuntu.com)...,,, ...
Connecting to security.ubuntu.com (security.ubuntu.com)||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 952468 (930K) [application/x-debian-package]
Saving to: ‘apt_1.0.1ubuntu2.11_amd64.deb’

100%[======================================>] 952.468      245KB/s   in 3,8s   

2016-02-08 19:56:29 (245 KB/s) - ‘apt_1.0.1ubuntu2.11_amd64.deb’ saved [952468/952468]

after that, sudo dpkg -i apt_apt_1.0.1ubuntu2.11_amd64.deb

the result is :

dpkg: error processing archive apt_apt_1.0.1ubuntu2.11_amd64.deb (--install):
 cannot access archive: No such file or directory
Errors were encountered while processing:
adelleodel@adelleodel-X450CC:~$ sudo dpkg -i apt_1.0.1ubuntu2.11_amd64.deb
(Reading database ... 230272 files and directories currently installed.)
Preparing to unpack apt_1.0.1ubuntu2.11_amd64.deb ...
Unpacking apt (1.0.1ubuntu2.11) over ( ...
dpkg: dependency problems prevent configuration of apt:
 apt depends on libstdc++6 (>= 4.6); however:
  Version of libstdc++6 on system is 4.4.5-8.
 apt depends on gnupg; however:
  Package gnupg is not installed.

dpkg: error processing package apt (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db ( ...
Errors were encountered while processing:
  • 2
    How did you remove apt-get? Do not tell that "you did not do anything". – Pilot6 Feb 8 '16 at 11:36
  • 1
    The dpkg -l lines show that you have removed the apt package, and only a few configuration files remain. Bad Puppy! No Cookie! – waltinator Feb 8 '16 at 11:52
  • er.... actually i did sudo apt-get remove libusb-0.1-4:amd64. – adelleodel Feb 8 '16 at 11:57
  • what to do then? T^T heeelp heeelp. i did remove some package that i think not belong with my program in ROS. – adelleodel Feb 8 '16 at 11:59
  • Probably you meant file $(which apt-get). file apt-get wouldn't tell you anything unless your working directory was where you had it installed (usually /usr/bin). – Edward Feb 8 '16 at 14:57

You have to download now the apt .deb package on your system from http://security.ubuntu.com/ubuntu/pool/main/a/apt/

Open a terminal(Ctrl-Alt-t) type:

32 Bit:

wget http://security.ubuntu.com/ubuntu/pool/main/a/apt/apt_v_x_x_x_i386.deb


64 Bit:

wget http://security.ubuntu.com/ubuntu/pool/main/a/apt/apt_v_x_x_x_amd64.deb

Install it by typing:

sudo dpkg -i  apt_apt_v_x_x_x_i386.deb

sudo dpkg -i  apt_apt_v_x_x_x_amd64.deb


Try to install it from Ubuntu Software Center.

  • how do i know which one is my version? – adelleodel Feb 8 '16 at 12:58
  • i've tried it with 1.0.1ubuntu2.11, but after i installed it, the output is like my update question. – adelleodel Feb 8 '16 at 13:01
  • Recomended to use latest version. as I am using "Ubuntu 14.04.2 LTS" and get output for supported version. by typing apt list apt Listing... Done apt/trusty-updates 1.0.1ubuntu2.11 i386 [upgradable from: 1.0.1ubuntu2.6] so you can decide which version you have to use. select and install. – Ramesh Chand Feb 8 '16 at 13:18
  • wget security.ubuntu.com/ubuntu/pool/main/a/apt/… like this? i got error from it.. – adelleodel Feb 8 '16 at 13:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.