7

How to install command locale & localedef for my image in the yocto project? I have try the following:

IMAGE_INSTALL_append = " glibc-locale"

But it does not work. How can I do it?

dudengke
  • 489
  • 2
  • 6
  • 18
  • In yocto it is sometimes difficult to distinguish between packages recipes and features and when to use them. Glibc-utils is a feature not a package. You could check your bitbake.conf, default-distrovars and local.conf.sample.extended to get idea. – jive Jun 08 '20 at 10:03

1 Answers1

10

locale is in a package called glibc-utils and localedef is in a package called localedef. Thus you can add these to your image by doing the following:

IMAGE_INSTALL_append = " glibc-utils localedef"

BTW I found these packages using the following command (there are other ways, but this will work if the package providing the file has already been built):

oe-pkgdata-util find-path "*/bin/locale*"
bluelightning
  • 461
  • 3
  • 5
  • The problem is... there is NO package called 'glibc-utils' in any version of Yocto/OpenEmbedded. I tried jethro and up to the master branch. What layer is it supposed to be in? – Alexander Amelkin Feb 03 '17 at 14:07
  • 1
    `oe-pkgdata-util find-path "*/bin/locale*"` indeed finds /usr/bin/locale in package glibc-utils, but when I try to `bitbake glibc-utils` I get `ERROR: Nothing PROVIDES 'glibc-utils'`. Any suggestions? – Alexander Amelkin Feb 03 '17 at 17:29
  • 3
    Ok, found it. For me, the actual package was `libc6-utils`. Found it using `oe-pkgdata-util lookup-pkg glibc-utils`. – Alexander Amelkin Feb 03 '17 at 18:03
  • On my Yocto Zeus based distro it was "glibc-locale" – Martin H. Feb 22 '21 at 17:12