Yocto with a package manager (ex: apt-get)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Yocto with a package manager (ex: apt-get)

97,492 Views
ssinfod
Contributor IV

Hello,

I'm using Yocto (dora) and I have some problem  making the "package manager" to work.

I'm trying to install "apt-get" on my distro but I don't know where to start...

Also, I would like to be able to connect to the common package repositories available (ex: ubuntu .deb, etc)

How do I do that ?

Can somebody help me ?

Thanks

ssinfod

Labels (4)
11 Replies

36,377 Views
ruicacristina
Contributor I

How did u manage the opkg package?

0 Kudos

36,377 Views
sagee
Contributor I

I am actually trying to accomplish this on the t2080rdb board and when I add "package_deb" to PACKAGE_CLASSES and EXTRA_IMAGE_FEATURES ="debug-tweaks package-management" and IMAGE_INSTALL_append +="apt" and I get a ton of errors when trying to build the rootfs.   Has anyone figured this out?  I would like to be able to do apt-get installs on target. 

I'm very new to building yocto or any version of linux to be honest.  All my work has be barebone software development with an emulator. 

0 Kudos

36,377 Views
marcpernia
Contributor I

Try adding a space preceding "apt".  i.e. IMAGE_INSTALL_append +=" apt"

SLR-

0 Kudos

36,378 Views
ssinfod
Contributor IV

I found some answer here regarding the package manager:

https://wiki.yoctoproject.org/wiki/How_do_I

In short, it seems to be possible to add apt to the image by:

Changing PACKAGE_CLASSES to package_deb

and making sure the image has IMAGE_FEATURES += "package-management"

also, you need a package feed.

I did not try it but some people said it works.,,

I hope it helps somebody

ssinfod

0 Kudos

36,376 Views
gerardb
Contributor I

You wrote:

"...also, you need a package feed".

Can you explain this further? Where.how is it specified.

My conf/local.conf includes the following:

CORE_IMAGE_EXTRA_INSTALL += "apt"

This successfully adds the "apt" package (for apt-get install <linux deb package name>, etc) to my yocto generated image BUT the "apt" package is not "initialized", for example there is no "sources.list" file and no "status" file so that apt-get install... doesn't really work. I can create an empty status file but it is not clear to me how I "point" apt-get to the "standard linux download repositories" where it can lookup from which internet location specific packages can be downloaded.

So basically "apt" is useless on my target system as it can't find any download locations for any "standard" linux packages/commands I (or my users) want to add to my/their system. It is not clear to me how I could setup yocto to automatically "initialize" the "apt" package (like the "apt-get install" command) with all the appropriate configuration files it needs to behave like it does on ubuntu, etc. For example if I want to install the nano editor (apt-get install nano), it doesn't know from where to download the "nano" package, hence it fails. I have tried to google this but none of the discussions are clear to me and I can't figure this out!

Any help would be much appreciated!

Best Regards

- Gerard

0 Kudos

36,378 Views
PaulDeMetrotion
Senior Contributor I

Did you ever fix this?

0 Kudos

36,376 Views
gusarambula
NXP TechSupport
NXP TechSupport

Perhaps the following document may also answer a lot of questions regarding package management in Yocto images:

Yocto Project Package Management - smart

36,378 Views
ranshalit
Senior Contributor I

Hello,

Is it possible to use more than one package manager with yocto ?

I see some mention of this in yocto docs Yocto Project Reference Manual 

Yet, I am not sure if it is possible... Is it ?

Thanks,

Ran

0 Kudos

36,375 Views
frankba
Contributor III

Hi Gerard,

when you bitbake an image, all packages will be under build/tmp/deploy/...

You must set up your own web server providing all those packages and add the server URL to the source list, see SourcesList - Debian Wiki and make this available to your clients.

I have done this successfully with ipk packages and opkg package manager, but apt should be similar.

Regards

Frank

0 Kudos

36,377 Views
ssinfod
Contributor IV

I did not go further than you did. You should probably ask on the yocto mailing list or on the yocto IRC channel.

Maybe an alternative would be to use a full embedded distro like Angstrom which is using the same bitbake process and have a package manager. (open embedded project)

Mailing list info:

https://www.yoctoproject.org/tools-resources/community/mailing-lists

0 Kudos

36,377 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

Thanks a lot for sharing your solution!!

Best Regards,

Alejandro

0 Kudos