Make error - Cannot install packages (busybox dnsmasq ...)

I try make LEDE ...
And problems:

Collected errors:
     * check_data_file_clashes: Package dnsmasq-dhcpv6 wants to install file /home/toper/owrt_lede/lede/build_dir/target-mipsel_mips32_musl/root-rb532/etc/hotplug.d/ntp/25-dnsmasqsec
            But that file is already provided by package  * dnsmasq
     * check_data_file_clashes: Package dnsmasq-dhcpv6 wants to install file /home/toper/owrt_lede/lede/build_dir/target-mipsel_mips32_musl/root-rb532/etc/init.d/dnsmasq
            But that file is already provided by package  * dnsmasq
     * check_data_file_clashes: Package dnsmasq-dhcpv6 wants to install file /home/toper/owrt_lede/lede/build_dir/target-mipsel_mips32_musl/root-rb532/usr/lib/dnsmasq/dhcp-script.sh
            But that file is already provided by package  * dnsmasq
     * check_data_file_clashes: Package dnsmasq-dhcpv6 wants to install file /home/toper/owrt_lede/lede/build_dir/target-mipsel_mips32_musl/root-rb532/usr/sbin/dnsmasq
            But that file is already provided by package  * dnsmasq
     * check_data_file_clashes: Package dnsmasq-dhcpv6 wants to install file /home/toper/owrt_lede/lede/build_dir/target-mipsel_mips32_musl/root-rb532/usr/share/acl.d/dnsmasq_acl.json
            But that file is already provided by package  * dnsmasq
     * check_data_file_clashes: Package dnsmasq-dhcpv6 wants to install file /home/toper/owrt_lede/lede/build_dir/target-mipsel_mips32_musl/root-rb532/usr/share/dnsmasq/rfc6761.conf
            But that file is already provided by package  * dnsmasq
     * opkg_install_cmd: Cannot install package dnsmasq-dhcpv6.
     * check_data_file_clashes: Package dnsmasq-full wants to install file /home/toper/owrt_lede/lede/build_dir/target-mipsel_mips32_musl/root-rb532/etc/hotplug.d/ntp/25-dnsmasqsec
            But that file is already provided by package  * dnsmasq
     * check_data_file_clashes: Package dnsmasq-full wants to install file /home/toper/owrt_lede/lede/build_dir/target-mipsel_mips32_musl/root-rb532/etc/init.d/dnsmasq
            But that file is already provided by package  * dnsmasq
     * check_data_file_clashes: Package dnsmasq-full wants to install file /home/toper/owrt_lede/lede/build_dir/target-mipsel_mips32_musl/root-rb532/usr/lib/dnsmasq/dhcp-script.sh
            But that file is already provided by package  * dnsmasq
     * check_data_file_clashes: Package dnsmasq-full wants to install file /home/toper/owrt_lede/lede/build_dir/target-mipsel_mips32_musl/root-rb532/usr/sbin/dnsmasq
            But that file is already provided by package  * dnsmasq
     * check_data_file_clashes: Package dnsmasq-full wants to install file /home/toper/owrt_lede/lede/build_dir/target-mipsel_mips32_musl/root-rb532/usr/share/acl.d/dnsmasq_acl.json
            But that file is already provided by package  * dnsmasq
     * check_data_file_clashes: Package dnsmasq-full wants to install file /home/toper/owrt_lede/lede/build_dir/target-mipsel_mips32_musl/root-rb532/usr/share/dnsmasq/rfc6761.conf
            But that file is already provided by package  * dnsmasq
     * opkg_install_cmd: Cannot install package dnsmasq-full.
     * check_data_file_clashes: Package dropbear wants to install file /home/toper/owrt_lede/lede/build_dir/target-mipsel_mips32_musl/root-rb532/usr/bin/scp
            But that file is already provided by package  * openssh-client
     * check_data_file_clashes: Package dropbear wants to install file /home/toper/owrt_lede/lede/build_dir/target-mipsel_mips32_musl/root-rb532/usr/bin/ssh
            But that file is already provided by package  * openssh-client
     * opkg_install_cmd: Cannot install package dropbear.
     * check_data_file_clashes: Package busybox wants to install file /home/toper/owrt_lede/lede/build_dir/target-mipsel_mips32_musl/root-rb532/usr/sbin/brctl
            But that file is already provided by package  * bridge
     * opkg_install_cmd: Cannot install package busybox.
    package/Makefile:65: recipe for target 'package/install' failed
    make[2]: *** [package/install] Error 255
    make[2]: Leaving directory '/home/toper/owrt_lede/lede'
    package/Makefile:104: recipe for target '/home/toper/owrt_lede/lede/staging_dir/target-mipsel_mips32_musl/stamp/.package_install' failed
    make[1]: *** [/home/toper/owrt_lede/lede/staging_dir/target-mipsel_mips32_musl/stamp/.package_install] Error 2
    make[1]: Leaving directory '/home/toper/owrt_lede/lede'
    /home/toper/owrt_lede/lede/include/toplevel.mk:216: recipe for target 'world' failed
    make: *** [world] Error 2

Looks like badly confused build config in .config, as you are trying to install e.g. several conflicting dnsmasq variants.

  • opkg_install_cmd: Cannot install package dnsmasq-dhcpv6.
  • opkg_install_cmd: Cannot install package dnsmasq-full.

What are you trying to do? Build and install ALL packages? Will not work.

CONFIG_DEFAULT_dnsmasq=y
CONFIG_PACKAGE_dnsmasq=y
CONFIG_PACKAGE_dnsmasq-dhcpv6=y
CONFIG_PACKAGE_dnsmasq-full=y
CONFIG_PACKAGE_dnsmasq_full_dhcp=y
CONFIG_PACKAGE_dnsmasq_full_dhcpv6=y
CONFIG_PACKAGE_dnsmasq_full_dnssec=y
CONFIG_PACKAGE_dnsmasq_full_auth=y
CONFIG_PACKAGE_dnsmasq_full_ipset=y
CONFIG_PACKAGE_dnsmasq_full_conntrack=y
CONFIG_PACKAGE_dnsmasq_full_noid=y
CONFIG_PACKAGE_dnsmasq_full_broken_rtc=y

this

Yes, that is invalid.

You can build them all (with =m), but only one can be installed (with =y). Those are mutually exclusive variants.

If you have more than 8MB of ROM, ditch dropbear and install openssh-server

  • OpenSSH has the scp binary, hence why you're getting that error, per @hnyman's explanation

Same reasoning as before... busybox's binary brctl was marked Y, therefore the same binary cannot be installed by bridge

I've found that it's easier if you customize BusyBox either last, or first, depending on whether image size is an issue.

  • If size is an issue due to ROM constraints, customize BusyBox first, as BusyBox's binaries are smaller in size than the full binaries.

  • If size is not an issue, customize BusyBox last
    • Go through and select all the packages you want, then build the image without any BusyBox customization
      • This ensures there's no errors, as you don't want to have to troubleshoot regular make errors for packages and make errors for BusyBox at the same time.

    • Once your image compiles successfully, go back in to menuconfig and customize BusyBox, run make V=s, then go back through and de-select whatever options are causing errors.
      • When I first began compiling my own images, I found it easier to customize BusyBox by it's categories, and once done with one category, I'd run make. This allowed me to specifically know where I needed to look if a compiling error occurred.

Whichever way you choose to do it, I recommend using Build Environments, as it makes reverting much easier.