I'm trying to add apt-get package manager to LFS (LINUX FROM SCRATCH) system. I have found a solution explaining how to 'compile apt-get and dpkg' for LFS. But it's very old and unusable. I searched for apt-get source code and found it on debian.org. It is Debian version of apt. I have downloaded apt- package and extracted its contents to the root directory of LFS. When my LFS system boots up and I type apt-get, this error is shown:

E: Unable to determine a suitable packaging system type.
  1. How can I add apt-get to LFS and get it working?
  2. What does the above error mean?

2 Answers 2

  1. Jimminy Cricket, that hint is Old:

[2002-06-12] * Initial hint.
[2003-09-17] * Changed format to fit new guidelines, added disclaimer about dpkg 1.10.

Can you reverse everything you did and try the Use dpkg (.deb) package management on LFS 6.3., which is newer (but not by much):

[2008-11-05] * Initial hint.

  1. I skimmed both hints, and it looks as if the version you linked didn't contain anything on the configuration files needed in the newer versions of dpkg and apt. An example of which is /etc/apt.conf.

If that doesn't work, you could try the RPM Hint from our friends at Redhat. I've bookmarked both hints, and I'll try them in a Virtualbox VM, and report back here (This will take awhile). In the meantime, have a look at Gentoo, which is basically LFS + a package manager (portage)


I'm using a Fedora Core 22 Virtualbox VM to build LFS as another VM disk. I'll provide more precise steps after the build completes.

  • I'll waited for your report @eyoung100!
    – Emad
    Jun 25, 2015 at 10:02

Fixed for me by :

echo "buster/sid" > /etc/debian_version
  • 3
    Could you say something about why this fixed it for you and what other consequences doing this may have?
    – Kusalananda
    Feb 13, 2020 at 17:51
  • works for me. im using echo unstable | sudo tee /etc/debian_version. apt-get requires that file. the debian version has an effect on package versions. see also debian.org/releases. another required file is /etc/apt/sources.list: sudo mkdir /etc/apt; echo -e "deb http://deb.debian.org/debian unstable main\ndeb-src http://deb.debian.org/debian unstable main" | sudo tee /etc/apt/sources.list; sudo apt-get update
    – milahu
    Sep 29, 2023 at 8:39

You must log in to answer this question.

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