2

I have built a sdcard.img for raspberry pi using Buildroot. When I run apt-get command it throws error "apt-get: command not found". I did not find apt-get/dpkg package to enable in 'make menuconfig' options. Now I'm trying to run cross-compiled opencv program on my Rpi but some shared libraries are missing and I want to install these libraries using apt repository (as I already did it on standard Raspbian Stretch os & program run successfully).

I googled it, there's no solution for Buildroot rasbpbian os. Also I tried downloading and installing .deb packages for apt/apt-get/dpkg, didn't work.

apt-get: command not found

I want to cross-compile a kernel which will have all the necessary packages such as apt/dpkg, bin and lib files. Or for the time being to get the work done need guidance to install apt/dpkg packages on Rpi buildroot os.

2

The apt command is the Debian solution to download packages from a repository, including their dependencies. If you want to use apt, you have to create a system that is based on these packages.

If you create a system with Buildroot, you can't use apt, even if you compile an apt program for that system. Whatever you want to install later with apt would most likely at least need the standard C library. Your system obviously already has a C library, because it wouldn't work without. But that library is not known to apt, so it would try to download and install the C library, overwriting the already present library. As it doesn't make sense to use apt on a Buildroot system, the Buildroot menu doesn't offer that.

In short, if you start with a package system (apt, yum, zypper or whatever), then stay with that system.

Is there a reason why you use Buildroot instead of Raspian?

I want to cross-compile a kernel which will have all the necessary packages such as apt/dpkg, bin and lib files.

There seems to be a misunderstanding what kernel means. A kernel is just a kernel and doesn't contain packages, binaries or libraries.

  • Thank you. I'm new in the field of embedded-linux development. I understood that I can't use apt in Buildroot system. The reason why I chose Buildroot instead of Raspbian is that I want to cross-compile my entire opencv project in single 'make' and run it when board boots up. – Prathamesh Konkar Jun 22 at 11:02
0

Debian (and Raspbian) have a very minimalistic installation package called debootstrap. It contains everything to run a very small Debian/Raspbian system only with essential needed programs. Every Debian installer starts with it. It contains also apt-get so you can build your Debian system from scratch step by step. debootstrap only needs a running linux system and wget and nothing else to get installed. With the Buildroot rasbpbian operating system you have a running system and it should not be a big problem to get wget installed from a package.

I don't know if debootstrap is usable for your setup but you may have a look at it at install Debian with debootstrap. I have made an installation using a Linux operating system on a laptop with intel cpu: Howto install RPi with debootstrap.

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.