kenzok8 / openwrt-packages

openwrt常用软件包
https://op.dllkids.xyz
6.53k stars 2.61k forks source link

luci-app-filebrowser编译时和filebrowser冲突的问题 #499

Open harry10086 opened 1 month ago

harry10086 commented 1 month ago

编译luci-app-filebrowser时提示错误:

Collected errors:
 * check_data_file_clashes: Package luci-app-filebrowser wants to install file /home/harry/immortalwrt/build_dir/target-x86_64_musl/root-x86/etc/config/filebrowser
        But that file is already provided by package  * filebrowser
 * check_data_file_clashes: Package luci-app-filebrowser wants to install file /home/harry/immortalwrt/build_dir/target-x86_64_musl/root-x86/etc/init.d/filebrowser
        But that file is already provided by package  * filebrowser
 * opkg_install_cmd: Cannot install package luci-app-filebrowser.
 * check_data_file_clashes: Package luci-app-filebrowser wants to install file /home/harry/immortalwrt/build_dir/target-x86_64_musl/root-x86/etc/config/filebrowser
        But that file is already provided by package  * filebrowser
 * check_data_file_clashes: Package luci-app-filebrowser wants to install file /home/harry/immortalwrt/build_dir/target-x86_64_musl/root-x86/etc/init.d/filebrowser
        But that file is already provided by package  * filebrowser
 * opkg_install_cmd: Cannot install package luci-i18n-filebrowser-zh-cn.
make[2]: *** [package/Makefile:71: package/install] Error 255
make[2]: Leaving directory '/home/harry/immortalwrt'
make[1]: *** [package/Makefile:124: /home/harry/immortalwrt/staging_dir/target-x86_64_musl/stamp/.package_install] Error 2
make[1]: Leaving directory '/home/harry/immortalwrt'
make: *** [/home/harry/immortalwrt/include/toplevel.mk:232: world] Error 2

搜索,问 AI 也只说明两个包发生了文件冲突,但luci-app-filebrowser又是依赖filebrowser的,而且上半年的时候我编译一样的方法编译是没问题的。不知道luci-app-filebrowser是不是更新了哪里? 我的解决方法是把filebrowser的makefile文件里的地址加了一个_alt,编译就正常了。

define Package/filebrowser/install
    $(call GoPackage/Package/Install/Bin,$(1))

    $(INSTALL_DIR) $(1)/etc/config
    $(INSTALL_CONF) $(CURDIR)/files/filebrowser.config $(1)/etc/config/filebrowser_alt
    $(INSTALL_DIR) $(1)/etc/init.d
    $(INSTALL_BIN) $(CURDIR)/files/filebrowser.init $(1)/etc/init.d/filebrowser_alt
endef