PHP install Yocto

We are trying to get Apache and PHP working together. I have a problem with php-modphp, because bitbake says:

ERROR: Nothing RPROVIDES ‘php-modphp’ (but /home/laboratorio/oe-core/build/…/layers/meta-toradex-demos/recipes-images/images/ RDEPENDS on or otherwise requires it)

How can I solve this issue?

We were following this old thread link

Thank you so much

Our hardware is:
Apalis iMX6D 1GB IT
Custom board base in Apalis Eval Board v1.1
Linux apalis-imx6-10806407 6.1.22-6.2.0 (Reference image Apalis-iMX6 tdx-reference-minimal-image)

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


The error you’re encountering with php-modphp suggests that the package you’re trying to include in your Yocto build does not exist under the name php-modphp in the layers you’re using, or it’s not available in the Yocto/OpenEmbedded layers you have included in your build environment.

To resolve this issue, you can take the following steps:

  1. Verify the Package Name: Ensure that the package name php-modphp is correct. Sometimes, package names may vary slightly between different versions of Yocto/OpenEmbedded layers. You might want to look for alternative names like php, php-cgi, or mod_php.

  2. Include the Correct Layer: If php-modphp is provided by a specific layer not included in your build environment, you need to include that layer. For PHP and Apache, you might need to include layers that provide these packages, such as meta-php or meta-webserver. Check the layer’s documentation or the OpenEmbedded Layer Index to find out which layer provides the package you need.

  3. Custom Recipe: If php-modphp is not available in any existing layer, you may need to create a custom recipe for it. This involves writing a Bitbake recipe that downloads, configures, compiles, and installs the package into your image. You can use existing PHP or Apache recipes as a reference.

  4. Dependencies: Ensure all dependencies for php-modphp are satisfied. If the package depends on other packages, those must be included in your build as well.

  5. Bitbake Layers Command: Use the bitbake-layers show-recipes command to search for the php package and its variants in your current environment. This can help you identify if the package is available under a different name or version.

  6. Layer Configuration: Make sure your bblayers.conf file includes all necessary layers. After adding any new layer, you should clean your build environment (bitbake -c cleansstate <target>) and attempt to rebuild.

Remember, when working with custom boards and specific hardware like the Apalis iMX6D 1GB IT, it’s crucial to ensure that all software components are compatible with your hardware configuration. This includes kernel modules, device drivers, and any hardware-specific optimizations that may affect the performance or functionality of Apache and PHP on your system.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Yocto Project | Toradex Developer Center.