The Problem:

I have a raspberry pi that is running linux. The system date and time are incorrect. I want to install NTP on it so that I can fix the time. All the instructions I can find anywhere say to use 'apt_get' to install NTP. However it seem like I don't have apt installed on my pi since I get the message "apt-get" not found whenever I try to use it.

What I have done:

I have been trying to install apt with dpkg but have been unsuccessful. I found some instruction here saying that I could use

wget http://mirrordirector.raspbian.org/raspbian/pool/main/a/apt/apt_0.9.7.7+rpi1_armhf.deb

to download a package for apt but I got a 404 error from the provided URL. I then when to http://mirrordirector.raspbian.org/raspbian/pool/main/a/apt/ in my browser and tried downloading one of the available packages

Once I had a package I tried to install it using dpkg -i apt_1.4.6_armhf.deb but got the following error:

dpkg: error processing archive apt_1.4.6_armhf.deb (--install):
 package architecture (armhf) does not match system (armel)
Errors were encountered while processing:

Then I found another site (archive.debian.org/debian/pool/main/a/apt/) that had packages that had 'armel' in the name instead of 'armhf' and dowloaded it and tried installing the new package using dpkg -i apt_0.7.20.2\+lenny2_armel.deb The result was the following errors:

(Reading database ... 333 files and directories currently installed.)
Preparing to unpack apt_0.7.20.2+lenny2_armel.deb ...
Unpacking apt ( over ( ...
dpkg: dependency problems prevent configuration of apt:
 apt depends on libc6 (>= 2.7-1); however:
  Package libc6 is not installed.
 apt depends on libgcc1 (>= 1:4.3); however:
  Package libgcc1 is not installed.
 apt depends on libstdc++6 (>= 4.3); however:
  Package libstdc++6 is not installed.
 apt depends on debian-archive-keyring; however:
  Package debian-archive-keyring is not installed.

dpkg: error processing package apt (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:

I don't know what to do now. Do I need to find a way to install all those missing libraries or does someone know a better way to get NTP installed?

closed as unclear what you're asking by Gilles, thrig, mdpc, Kusalananda, G-Man Jun 17 '17 at 5:15

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • What does dpkg --version output? What about cat /etc/debian_version? – Stephen Kitt Jun 16 '17 at 21:27
  • No libc6? This is not a Debian system. How come you have dpkg? What distribution did you install there? What is the output of dpkg -l ? – Gilles Jun 16 '17 at 22:03
  • There's no point in looking for a different apt package: this is the right one for your processor. You'd need to install all those missing dependencies. But the actual solution is to use the proper package manager for your distribution, or to install Debian if Debian is what you want. – Gilles Jun 16 '17 at 22:04
  • does sudo apt-get install work? – NarūnasK Jun 16 '17 at 22:31

As you stated at the top of your question (under background), you are actually trying to install NTP.

Your tutorials are most likely assuming you are using Ubuntu or other Debian-based distributions as it is the main Linux OS Set. Other comments also agree that you might be using the non-PIXEL desktop.

If you are using Redhat or CentOS, try using yum install [program].

If you are using Debian or OS based off Debian, use apt-get install [program], however, you do not seem to be on Debian

If you are using Fedora, use yum install [program].

If you are using OpenSUSE, use rpm -i [program].rpm.

If none of these work, download the .tar.gz package from here using wget [programlink], -> unpack -> ./configure -> make -> make install.



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