Package lib installation conflict during the system building

I had successfully compiled package/target ago, currently I manually pull the luci-app-clash and try to build it as per the package instruction. By the end it throws some error:

Collected errors:
 * check_data_file_clashes: Package libustream-openssl20150806 wants to install file /home/a13519/openwrt/build_dir/target-x86_64_musl/root-x86/lib/libustream-ssl.so
        But that file is already provided by package  * libustream-mbedtls20150806
 * opkg_install_cmd: Cannot install package libustream-openssl20150806.
 * check_data_file_clashes: Package libustream-openssl20150806 wants to install file /home/a13519/openwrt/build_dir/target-x86_64_musl/root-x86/lib/libustream-ssl.so
        But that file is already provided by package  * libustream-mbedtls20150806
 * opkg_install_cmd: Cannot install package luci-app-clash.
package/Makefile:65: recipe for target 'package/install' failed
make[2]: *** [package/install] Error 255

I try to unselect the libustream-mbedtls from menuconfig and rebuild, but the option was locked by -*- which I can't remove it.

-- libustream-mbedtls......................... ustream SSL Library (mbedtls)
-
- libustream-openssl......................... ustream SSL Library (openssl)

how to properly manage this to prevent the conflicts?

Thanks,
Song

You can look into dependencies for a package within the kernel menuconfig calling "help" (or search KConfig files) for the package selected:

│ Symbol: PACKAGE_libustream-mbedtls [=n] │
│ Type : tristate │
│ Defined at tmp/.config-package.in:62160 │
│ Prompt: libustream-mbedtls......................... ustream SSL Library (mbedtls) │
│ Location: │
│ -> Libraries │
│ Selects: PACKAGE_libmbedtls [=n] && PACKAGE_libc [=n] && PACKAGE_libpthread [=n] && PACKAGE_librt [=n] && \ │
│ PACKAGE_libubox [=y] │
│ Selected by [n]: │
│ - PACKAGE_asu [=n] && !arc [=n] && x86_64 [=n] │
│ - PACKAGE_cshark [=n] │
│ - PACKAGE_cache-domains-mbedtls [=n]

Basically you have to track back dependencies and deselect packages which are locking/blocking the deselection of a certain package.

E. g. if you select a LuCI app "luci-app-adblock" it selects automatically Network/adblock. ablock itself is blocked for deselection now unless you deselect luci-app-adblock again. If you look into Network/adblock you can see:

Selected by [y]: │
│ - PACKAGE_luci-app-adblock [=y]

Now you know that you have to remove luci-app-adblock first to remove adblock itself.

BUT adblock itself is selecting (Section "Selects") also packages (which do or do not depend on others and so on). You have to dissolve this dependencies if necessary also.

I hope I've wrote it understandable.

1 Like

Your description is really helpful, now after removing the overlap package, I can find the option to deselect the openssl, thank you very much, this is the power for openwrt community!

Cheers,
Song

1 Like

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.