2

I used debootstrap to create a chroot environment:

sudo debootstrap trusty trusty/
sudo chroot trusty

I'm using chroot. but command apt-get doesn't work:

I have no name!@user:/# apt-get install python
bash: apt-get: command not found

How can i use apt-get in chroot. Or, how can i install an specific application (for instance python), for chroot, so chroot can use it?

I'm using Ubuntu 14.04.

Thanks in advance.

Shayan
  • 421
  • 1
  • 5
  • 13
  • 5
    Possible duplicate of [Use apt-get in chroot directory](https://askubuntu.com/questions/633645/use-apt-get-in-chroot-directory) – user535733 Oct 22 '18 at 18:45
  • Is your `PATH` correct? What happens if you try `/usr/bin/apt-get`? – muru Oct 22 '18 at 20:35
  • It didn't have `/trusty/bin/apt-get`. Tho i tried to copy it from the root:`cp -r /usr/bin/apt-get /trusty/bin/`. But the package needed another packages, so it would give another error that the package is not complete. – Shayan Oct 23 '18 at 13:42

0 Answers0