Software⏱️ 3 min read📅 2026-06-11

How to Fix: Yocto dnf error in do_roofs

Yocto dnf error in do_roofs: Unable to find a match for argument my-bootscript

Quick Answer: The issue is caused by the 'oe-repo' not being able to find the package 'my-bootscript'. You need to add the package to the 'oe-repo' by running 'bitbake -f my-bootscript' before building the image.

The error 'Could not invoke dnf' occurs when the Yocto build process fails to compile the boot script, resulting in an incomplete rootfs image. This issue affects users who rely on the fsl-image-gui package for a functional system.

This frustrating error is caused by a mismatch between the expected and actual package names, leading to an inability to find a match in the repository. By following these steps, you can resolve this issue and ensure a successful build process.

🛑 Root Causes of the Error

  • The primary reason for this error lies in the difference between the package name 'my-bootscript' and the expected package name 'my-bootscript_1.0'. This discrepancy prevents the dnf command from finding a match, resulting in the error.
  • An alternative reason could be that the 'my-bootscript' package is not installed or configured correctly, leading to an incomplete rootfs image.

✅ Best Solutions to Fix It

Update the recipe to use the correct package name

  1. Step 1: Open the recipe file '/meta-myrepo/recipes-bootscript/bootscript/my-bootscript_1.0.bb' in a text editor.
  2. Step 2: Change the 'PN' variable from 'my-bootscript' to 'my-bootscript_1.0'. This will ensure that the correct package name is used throughout the build process.
  3. Step 3: Save the changes and run the command 'bitbake my-bootscript' again to verify the update.

Verify package installation and configuration

  1. Step 1: Check if the 'my-bootscript_1.0' package is installed by running the command 'dpkg -s my-bootscript_1.0'. If it's not installed, install it using the command 'sudo apt-get install my-bootscript_1.0'.
  2. Step 2: Verify that the package is configured correctly by checking the '/usr/bin/dnf' command. Ensure that the correct package name is used to invoke the dnf command.

💡 Conclusion

By following these steps, you should be able to resolve the 'Could not invoke dnf' error and ensure a successful build process for your Yocto project.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions