首先

opkg update

然后安装 opkg install lighttpd lighttpd-mod-webdav lighttpd-mod-auth l ighttpd-mod-authn_file

root@softRouter:~# opkg install lighttpd lighttpd-mod-webdav lighttpd-mod-auth l
ighttpd-mod-authn_file
Installing lighttpd (1.4.58-1) to root...
Downloading https://openwrt.proxy.ustclug.org/snapshots/packages/x86_64/packages/lighttpd_1.4.58-1_x86_64.ipk
Multiple packages (libpthread and libpthread) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (libpthread and libpthread) providing same name marked HOLD or PREFER. Using latest.
Installing libgmp10 (6.1.2-2) to root...
Downloading https://openwrt.proxy.ustclug.org/snapshots/packages/x86_64/base/libgmp10_6.1.2-2_x86_64.ipk
Installing lighttpd-mod-webdav (1.4.58-1) to root...
Downloading https://openwrt.proxy.ustclug.org/snapshots/packages/x86_64/packages/lighttpd-mod-webdav_1.4.58-1_x86_64.ipk
Multiple packages (libpthread and libpthread) providing same name marked HOLD or PREFER. Using latest.
Multiple packages (libpthread and libpthread) providing same name marked HOLD or PREFER. Using latest.
Installing lighttpd (1.4.58-1) to root...
Installing libsqlite3-0 (3330000-1) to root...
Downloading https://openwrt.proxy.ustclug.org/snapshots/packages/x86_64/packages/libsqlite3-0_3330000-1_x86_64.ipk
Installing lighttpd-mod-auth (1.4.58-1) to root...
Downloading https://openwrt.proxy.ustclug.org/snapshots/packages/x86_64/packages/lighttpd-mod-auth_1.4.58-1_x86_64.ipk
Installing libnettle8 (3.6-1) to root...
Downloading https://openwrt.proxy.ustclug.org/snapshots/packages/x86_64/base/libnettle8_3.6-1_x86_64.ipk
Installing lighttpd-mod-authn_file (1.4.58-1) to root...
Downloading https://openwrt.proxy.ustclug.org/snapshots/packages/x86_64/packages/lighttpd-mod-authn_file_1.4.58-1_x86_64.ipk
Configuring libnettle8.
Configuring lighttpd.
Configuring lighttpd-mod-auth.
Configuring lighttpd-mod-authn_file.
Collected errors:
 * check_data_file_clashes: Package libgmp10 wants to install file /usr/lib/libgmp.so.10
    But that file is already provided by package  * libgmp
 * check_data_file_clashes: Package libgmp10 wants to install file /usr/lib/libgmp.so.10.3.2
    But that file is already provided by package  * libgmp
 * opkg_install_cmd: Cannot install package lighttpd.
 * check_data_file_clashes: Package libsqlite3-0 wants to install file /usr/lib/libsqlite3.so.0
    But that file is already provided by package  * libsqlite3
 * check_data_file_clashes: Package libsqlite3-0 wants to install file /usr/lib/libsqlite3.so.0.8.6
    But that file is already provided by package  * libsqlite3
 * opkg_install_cmd: Cannot install package lighttpd-mod-webdav.
root@softRouter:~#

解决办法就是 加上 --nodeps --force-depends 的强制安装参数
opkg --nodeps install lighttpd-mod-webdav --force-depends

参数说明:

  • --force-depends means 在安装、删除软件包时无视失败的依赖
  • --nodeps means 不跟踪依赖,忽略依赖

更多可翻阅: https://openwrt.org/zh/docs/techref/opkg

root@softRouter:~# opkg --nodeps install lighttpd-mod-webdav --force-depends
Installing lighttpd-mod-webdav (1.4.58-1) to root...
Downloading https://openwrt.proxy.ustclug.org/snapshots/packages/x86_64/packages/lighttpd-mod-webdav_1.4.58-1_x86_64.ipk
Configuring lighttpd-mod-webdav.

最终查看 发现全都安装成功 且已是最新版

root@softRouter:~# opkg install lighttpd lighttpd-mod-webdav lighttpd-mod-auth lighttpd-mod-authn_file
Package lighttpd (1.4.58-1) installed in root is up to date.
Package lighttpd-mod-webdav (1.4.58-1) installed in root is up to date.
Package lighttpd-mod-auth (1.4.58-1) installed in root is up to date.
Package lighttpd-mod-authn_file (1.4.58-1) installed in root is up to date.

end.