BPI-R3 issue install lighttpd

Hello all , i try to install lighttpd (for next cloud)but i have issue :

Blockquote 2023-04-27 10:29:26: (../src/plugin.c.214) dlopen() failed for: /usr/lib/lighttpd/mod_indexfile.so Error loading shared library /usr/lib/lighttpd/mod_indexfile.so: No such file or directory
2023-04-27 10:29:26: (../src/server.c.1448) loading plugins finally failed
lighttpd.conf validation failed

Use OpenWrt SNAPSHOT r22658-2c530fcb97 .
Thank You!

Are you following the guide in the wiki? What step are you on?

Have you installed all the required packages?

Yes i follow step by step. But, /etc/init.d/lighttpd start i have:

Blockquoteroot@OpenWrt:~# /etc/init.d/lighttpd start
2023-04-29 10:54:45: (../src/plugin.c.214) dlopen() failed for: /usr/lib/lighttpd/mod_indexfile.so Error loading shared library /usr/lib/lighttpd/mod_indexfile.so: No such file or directory
2023-04-29 10:54:45: (../src/server.c.1448) loading plugins finally failed
lighttpd.conf validation failed

Same problem whit mod_indexfile.so. Compile lighttpd in SDK but without change.
I don't understand error : (../src/plugin.c.214) dlopen.

That file, mod_indexfile.so does not exist in any of the lighttpd packages. However it does exist within opensuse, so it can exist.

This would appear to be an issue as to how lighttpd was built. Others have had the same problem on other os's. Cure seems to be configuring a mix of static & shared at time of build. You need to raise an bug report, or use another server such as apache.

1 Like

There appears to be an issue in the upstream lighttpd meson.build, and OpenWRT uses meson to build lighttpd. I'll submit a patch to OpenWRT on github before the end of the weekend.

You can manually do this to the unpackaged lighttpd source in your build tree:

--- a/src/meson.build
+++ b/src/meson.build
@@ -656,7 +656,7 @@ executable('lighttpd-angel',
 executable('lighttpd', configparser,
-       sources: common_src + main_src,
+       sources: common_src + main_src + builtin_mods,
        dependencies: [ common_flags, lighttpd_flags
                , libattr
                , libcrypto

Try to compile but :

Applying ./patches/020-meson-mod_webdav_min.patch using plaintext:
patching file src/meson.build
Hunk #1 FAILED at 606.
Hunk #2 FAILED at 678.
2 out of 2 hunks FAILED -- saving rejects to file src/meson.build.rej
Patch failed! Please fix ./patches/020-meson-mod_webdav_min.patch!
make[2]: *** [Makefile:247: /home/f11/sdk108/build_dir/target-aarch64_cortex-a53_musl/lighttpd-1.4.69/.prepared_b2963ff2ddb89efe2ecce2b702a0fd81_18f1e190c5d53547fed41a3eaa76e9e9] Error 1
make[2]: Leaving directory '/home/f11/sdk108/feeds/packages/net/lighttpd'
time: package/feeds/packages/lighttpd/compile#0.23#0.04#0.22

Thank You for your help!
P.S. Compile in SDK

That patch applies cleanly if applied before others.
Perhaps you need to git pull (and then updates feeds and such)
or you may need to make V=s -j 4 -k package/feeds/packages/lighttpd/clean

I have submitted subsequent patches to fix the missing mod_indexfile (and mod_staticfile) in https://github.com/openwrt/packages/pull/20909 as those modules are now built-in to lighttpd by default.

1 Like

If you applied my patch prior to the one in the patches/ dir done by the build, then try building with QUILT=1
make V=s -j 4 -k package/feeds/packages/lighttpd/prepare QUILT=1
make V=s -j 4 -k package/feeds/packages/lighttpd/refresh QUILT=1
(I'm not as familiar with all the openwrt-isms, but these helped me in the past.)

(Alternatively, if you're stuck, you might delete patches/020-meson-mod_webdav_min.patch if you're not using the special-package it enables.)

1 Like

Note: I also edited the patch in my post above to match the src in lighttpd-1.4.69.tar.xz
Sorry for the trouble.

Edit: https://github.com/openwrt/packages/pull/20909 has patches ready for openwrt master, passing CI.

I had to use make V=s -j 4 -k package/feeds/packages/lighttpd/refresh QUILT=1 to adjust the patches from upstream lighttpd.

1 Like

https://github.com/openwrt/packages/pull/20909 has been merged into openwrt master.
Would you please pull and try building lighttpd?

1 Like

I compile in SDK and :

7408 root 2224 S /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
7410 root 48604 S /usr/bin/php-fcgi
7434 root 48604 S /usr/bin/php-fcgi
7442 root 1316 R ps

Now I try to install nextcloud...

Thank you !!!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.