zsh: command not found: arm-linux-gnueabihf-gcc解决方案

本文讲述了如何在虚拟机的交叉编译环境中解决因环境变量问题导致的gcc找不到的错误,重点在于在~/.zshrc中添加路径以实现环境变量的持久化。同时,介绍了Linux终端环境下环境变量加载的常见问题和设置方法。

文章目录


问题

在虚拟机上安装交叉编译环境,PC通过终端ssh连接后,发现编译报错,查看版本发现,环境变量的问题:“zsh: command not found: arm-linux-gnueabihf-gcc”,通过在/etc/profile中添加“export PATH=$PATH:/usr/local/arm/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin”是不够的。


解决方案

在~/.profile中也添加“export PATH=$PATH:/usr/local/arm/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin”,执行source .profile后,问题解决。
在这里插入图片描述
注意:这样另开终端后,失效,需再参考【3】中的办法,在.zshrc中将添加“source ~/.profile”:
在这里插入图片描述


参考

【1】Linux ssh执行命令不加载环境变量
【2】ubuntu环境变量的三种设置方法
【3】

对比正常编译的log能找到什么问题吗 (spider) zhanggexu@ubuntu:~/newcode/be230_new/Iplatform/build$ make PRODUCT_NAME=be230v1 iplatform_package/xtables-addons/{clean,compile,install} V=s openssl support zlib make[1]: Entering directory /home/zhanggexu/newcode/be230_new/Iplatform/openwrt' make[2]: Entering directory /home/zhanggexu/newcode/be230_new/Iplatform/openwrt’ make[3]: Entering directory /home/zhanggexu/newcode/be230_new/Iplatform/openwrt' make[3]: Leaving directory /home/zhanggexu/newcode/be230_new/Iplatform/openwrt’ make[2]: Leaving directory /home/zhanggexu/newcode/be230_new/Iplatform/openwrt' make[2]: Entering directory /home/zhanggexu/newcode/be230_new/Iplatform/openwrt’ make[3]: Entering directory /home/zhanggexu/newcode/be230_new/Iplatform/packages/opensource/xtables-addons' rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be230v1/stamp/.xtables-addons_installed rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-compat-xtables_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-rawpost_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-account_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-account_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-httphost_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-httphost_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-urlfilter_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-urlfilter_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-app_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-app_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-pctl_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-pctl_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-blogskip_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-blogskip_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-blog_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-blog_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-blogtg_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-blogtg_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-chaos_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-chaos_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-condition_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-condition_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-delude_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-delude_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-dhcpmac_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-dhcpmac_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-dnetmap_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-dnetmap_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-fuzzy_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-fuzzy_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-geoip_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-geoip_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-iface_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-iface_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-ipmark_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-ipmark_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-ipp2p_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-ipp2p_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-ipv4options_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-ipv4options_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-length2_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-length2_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-logmark_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-logmark_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-lscan_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-lscan_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-lua_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-lua_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-psd_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-psd_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-quota2_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-quota2_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-rawnat_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-rawnat_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-steal_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-steal_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-sysrq_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-sysrq_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-trigger_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-trigger_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-tarpit_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-tarpit_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-LOOPBACKDNAT_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-LOOPBACKDNAT_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-V6PORTS_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-V6PORTS_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptables-mod-CHECKPORTS_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/kmod-ipt-CHECKPORTS_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/iptaccount_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/bin/model_brcm_bcm490x-be230v1/packages/xtables-addons_* rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be230v1/packages/xtables-addons.list /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/host/packages/xtables-addons.list rm -rf /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/xtables-addons-3.0 make[3]: Leaving directory /home/zhanggexu/newcode/be230_new/Iplatform/packages/opensource/xtables-addons’ make[2]: Leaving directory /home/zhanggexu/newcode/be230_new/Iplatform/openwrt' make[1]: Leaving directory /home/zhanggexu/newcode/be230_new/Iplatform/openwrt’ make[1]: Entering directory /home/zhanggexu/newcode/be230_new/Iplatform/openwrt' make[2]: Entering directory /home/zhanggexu/newcode/be230_new/Iplatform/openwrt’ make[3]: Entering directory /home/zhanggexu/newcode/be230_new/Iplatform/openwrt' make[3]: Leaving directory /home/zhanggexu/newcode/be230_new/Iplatform/openwrt’ make[2]: Leaving directory /home/zhanggexu/newcode/be230_new/Iplatform/openwrt' make[2]: Entering directory /home/zhanggexu/newcode/be230_new/Iplatform/openwrt’ make[3]: Entering directory /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/package/iptables' WARNING: skipping iptables-mod-conntrack-extra -- package not selected WARNING: skipping iptables-mod-filter -- package not selected WARNING: skipping iptables-mod-ipopt -- package not selected WARNING: skipping iptables-mod-nat-extra -- package not selected WARNING: skipping iptables-mod-ulog -- package not selected WARNING: skipping iptables-mod-hashlimit -- package not selected WARNING: skipping iptables-mod-led -- package not selected WARNING: skipping iptables-mod-tproxy -- package not selected WARNING: skipping iptables-mod-tee -- package not selected WARNING: skipping iptables-mod-u32 -- package not selected WARNING: skipping iptables-mod-nflog -- package not selected WARNING: skipping libiptc -- package not selected make[3]: Leaving directory /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/package/iptables’ make[3]: Entering directory /home/zhanggexu/newcode/be230_new/Iplatform/packages/opensource/xtables-addons' mkdir -p /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/xtables-addons-3.0 cp -fpR ./src-3.x/* /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/xtables-addons-3.0 echo -------"v3"-------- -------v3-------- touch /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/xtables-addons-3.0/.prepared_00dc9c25a5f708b2e4920ad8c3a4118b (cd /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/xtables-addons-3.0; rm -f aclocal.m4; if [ -f ./configure.ac ] || [ -f ./configure.in ]; then [ -d ./autom4te.cache ] && rm -rf autom4te.cache; [ -e ./config.rpath ] || ln -s /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/scripts/config.rpath ./config.rpath; touch NEWS AUTHORS COPYING ABOUT-NLS ChangeLog; AUTOM4TE=/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/host/bin/autom4te AUTOCONF=/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/host/bin/autoconf AUTOMAKE=/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/host/bin/automake ACLOCAL=/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/host/bin/aclocal AUTOHEADER=/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/host/bin/autoheader LIBTOOLIZE=/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/host/bin/libtoolize LIBTOOL=/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/host/bin/libtool M4=/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/host/bin/m4 AUTOPOINT=true /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/host/bin/autoreconf -v -f -i -s -B /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/host/share/aclocal -I /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be230v1/host/share/aclocal -I /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be230v1/usr/share/aclocal -I m4 -I . . || true; fi; ); autoreconf: Entering directory .’ autoreconf: configure.ac: not using Gettext autoreconf: running: /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/host/bin/aclocal -I /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be230v1/host/share/aclocal -I /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be230v1/usr/share/aclocal -I m4 -I . --force -I m4 autoreconf: configure.ac: tracing autoreconf: running: /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/host/bin/libtoolize --force OpenWrt-libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, build-aux'. OpenWrt-libtoolize: linking file build-aux/ltmain.sh’ OpenWrt-libtoolize: putting macros in AC_CONFIG_MACRO_DIR, m4'. OpenWrt-libtoolize: linking file m4/libtool.m4’ OpenWrt-libtoolize: linking file m4/ltoptions.m4' OpenWrt-libtoolize: linking file m4/ltsugar.m4’ OpenWrt-libtoolize: linking file m4/ltversion.m4' OpenWrt-libtoolize: linking file m4/lt~obsolete.m4’ autoreconf: running: /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/host/bin/autoconf --include=/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be230v1/host/share/aclocal --include=/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be230v1/usr/share/aclocal --include=m4 --include=. --prepend-include=/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/host/share/aclocal --force autoreconf: running: /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/host/bin/autoheader --include=/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be230v1/host/share/aclocal --include=/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be230v1/usr/share/aclocal --include=m4 --include=. --prepend-include=/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/host/share/aclocal --force autoreconf: running: /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/host/bin/automake --add-missing --force-missing Makefile.am:6: warning::=’-style assignments are not portable Makefile.am:21: warning::=’-style assignments are not portable Makefile.am:21: warning: shell mktemp -dtu: non-POSIX variable name Makefile.am:21: (probably a GNU make extension) autoreconf: Leaving directory .' (cd /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/xtables-addons-3.0/./; if [ -x ./configure ]; then /usr/bin/find /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/xtables-addons-3.0/ -name config.guess | xargs -r chmod u+w; /usr/bin/find /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/xtables-addons-3.0/ -name config.guess | xargs -r -n1 cp /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/scripts/config.guess; /usr/bin/find /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/xtables-addons-3.0/ -name config.sub | xargs -r chmod u+w; /usr/bin/find /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/xtables-addons-3.0/ -name config.sub | xargs -r -n1 cp /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/scripts/config.sub; AR=arm-buildroot-linux-gnueabi-ar AS="arm-buildroot-linux-gnueabi-gcc -c " LD=arm-buildroot-linux-gnueabi-ld NM=arm-buildroot-linux-gnueabi-nm CC="arm-buildroot-linux-gnueabi-gcc" GCC="arm-buildroot-linux-gnueabi-gcc" CXX="arm-buildroot-linux-gnueabi-g++" RANLIB=arm-buildroot-linux-gnueabi-ranlib STRIP=arm-buildroot-linux-gnueabi-strip OBJCOPY=arm-buildroot-linux-gnueabi-objcopy OBJDUMP=arm-buildroot-linux-gnueabi-objdump SIZE=arm-buildroot-linux-gnueabi-size CFLAGS=" -DSUPPORT_HOMECARE_PRO_BLOCKING -DPCTL_BLOCK_URL -DSUPPORT_HOMECARE_PRO_URL_CLASS -DPCTL_SUPPORT_IPV6 -DUSER_32BIT_COMPAT_KERNEL_64BIT -DPCTL_FING_SUPPORT -DSUPPORT_BLOCKING_WHITE_LIST -I/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/../../bcm504L04/bcm963xx_5.04L.04/kernel/linux-4.19/../"bcmkernel/include" -I/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/../../bcm504L04/bcm963xx_5.04L.04/kernel/linux-4.19/../"bcmkernel/include"/uapi" CXXFLAGS=" -DSUPPORT_HOMECARE_PRO_BLOCKING -DPCTL_BLOCK_URL -DSUPPORT_HOMECARE_PRO_URL_CLASS -DPCTL_SUPPORT_IPV6 -DUSER_32BIT_COMPAT_KERNEL_64BIT -DPCTL_FING_SUPPORT -DSUPPORT_BLOCKING_WHITE_LIST -I/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/../../bcm504L04/bcm963xx_5.04L.04/kernel/linux-4.19/../"bcmkernel/include" -I/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/../../bcm504L04/bcm963xx_5.04L.04/kernel/linux-4.19/../"bcmkernel/include"/uapi" CPPFLAGS="-I/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be230v1/usr/include -I/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be230v1/include -I/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/usr-be230v1/include -I/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/../../bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/usr/include " LDFLAGS="-L/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be230v1/usr/lib -L/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be230v1/lib -Wl,-rpath-link,/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be230v1/usr/lib -L/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/../../bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/usr/lib -L/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/../../bcm504L04/toolchain/opt/toolchains/crosstools-arm_softfp-gcc-10.3-linux-4.19-glibc-2.32-binutils-2.36.1/lib " ./configure --target=arm-openwrt-linux-uclibc --host=arm-openwrt-linux-uclibc --build=i686-linux-gnu --program-prefix="" --program-suffix="" --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls --with-kbuild="/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/../../bcm504L04/bcm963xx_5.04L.04/kernel/linux-4.19" --with-xtables="/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/target-arm-openwrt-linux-uclibc-be230v1/usr" --with-xtlibdir="/usr/lib/iptables" ; fi; ) configure: WARNING: unrecognized options: --disable-nls, --with-xtables configure: loading site script /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/include/site/arm-openwrt-linux-uclibc checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for arm-openwrt-linux-uclibc-strip... arm-buildroot-linux-gnueabi-strip checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking for arm-openwrt-linux-uclibc-gcc... arm-buildroot-linux-gnueabi-gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... yes checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether arm-buildroot-linux-gnueabi-gcc accepts -g... yes checking for arm-buildroot-linux-gnueabi-gcc option to accept ISO C89... none needed checking whether arm-buildroot-linux-gnueabi-gcc understands -c and -o together... yes checking for style of include used by make... GNU checking dependency style of arm-buildroot-linux-gnueabi-gcc... gcc3 checking for arm-openwrt-linux-uclibc-ar... arm-buildroot-linux-gnueabi-ar checking the archiver (arm-buildroot-linux-gnueabi-ar) interface... ar checking build system type... i686-pc-linux-gnu checking host system type... arm-openwrt-linux-uclibc checking how to print strings... printf checking for a sed that does not truncate output... /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/staging_dir/host/bin/sed checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for fgrep... /bin/grep -F checking for ld used by arm-buildroot-linux-gnueabi-gcc... arm-buildroot-linux-gnueabi-ld checking if the linker (arm-buildroot-linux-gnueabi-ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... arm-buildroot-linux-gnueabi-nm checking the name lister (arm-buildroot-linux-gnueabi-nm) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 805306365 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking how to convert i686-pc-linux-gnu file names to arm-openwrt-linux-uclibc format... func_convert_file_noop checking how to convert i686-pc-linux-gnu file names to toolchain format... func_convert_file_noop checking for arm-buildroot-linux-gnueabi-ld option to reload object files... -r checking for arm-openwrt-linux-uclibc-objdump... arm-buildroot-linux-gnueabi-objdump checking how to recognize dependent libraries... pass_all checking for arm-openwrt-linux-uclibc-dlltool... no checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for arm-openwrt-linux-uclibc-ar... (cached) arm-buildroot-linux-gnueabi-ar checking for archiver @FILE support... @ checking for arm-openwrt-linux-uclibc-strip... (cached) arm-buildroot-linux-gnueabi-strip checking for arm-openwrt-linux-uclibc-ranlib... arm-buildroot-linux-gnueabi-ranlib checking command to parse arm-buildroot-linux-gnueabi-nm output from arm-buildroot-linux-gnueabi-gcc object... ok checking for sysroot... no checking for arm-openwrt-linux-uclibc-mt... no checking for mt... mt configure: WARNING: using cross tools not prefixed with host triplet checking if mt is a manifest tool... no checking how to run the C preprocessor... arm-buildroot-linux-gnueabi-gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if arm-buildroot-linux-gnueabi-gcc supports -fno-rtti -fno-exceptions... no checking for arm-buildroot-linux-gnueabi-gcc option to produce PIC... -fPIC -DPIC checking if arm-buildroot-linux-gnueabi-gcc PIC flag -fPIC -DPIC works... yes checking if arm-buildroot-linux-gnueabi-gcc static flag -static works... yes checking if arm-buildroot-linux-gnueabi-gcc supports -c -o file.o... yes checking if arm-buildroot-linux-gnueabi-gcc supports -c -o file.o... (cached) yes checking whether the arm-buildroot-linux-gnueabi-gcc linker (arm-buildroot-linux-gnueabi-ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking linux/netfilter/x_tables.h usability... yes checking linux/netfilter/x_tables.h presence... yes checking for linux/netfilter/x_tables.h... yes checking pkg-config is at least version 0.9.0... yes checking for libxtables... yes checking Xtables module directory... /usr/lib/iptables checking kernel version that we will build against... 4.19.275.0 in /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/../../bcm504L04/bcm963xx_5.04L.04/kernel/linux-4.19 WARNING: That kernel version is not officially supported yet. Continue at own luck. checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating Makefile.iptrules config.status: creating Makefile.mans config.status: creating geoip/Makefile config.status: creating extensions/Makefile config.status: creating extensions/ACCOUNT/Makefile config.status: creating extensions/pknock/Makefile config.status: creating config.h config.status: executing depfiles commands config.status: executing libtool commands configure: WARNING: unrecognized options: --disable-nls, --with-xtables rm -f /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/xtables-addons-3.0/.configured_* touch /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/xtables-addons-3.0/.configured_ make -j1 -C /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/xtables-addons-3.0 ARCH="arm64" CROSS_COMPILE="aarch64-buildroot-linux-gnu-" EXTRA_CFLAGS="-DSUPPORT_HOMECARE_PRO_BLOCKING -DPCTL_BLOCK_URL -DSUPPORT_HOMECARE_PRO_URL_CLASS -DPCTL_SUPPORT_IPV6 -DUSER_32BIT_COMPAT_KERNEL_64BIT -DPCTL_FING_SUPPORT -DSUPPORT_BLOCKING_WHITE_LIST -I/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/../../bcm504L04/bcm963xx_5.04L.04/kernel/linux-4.19/../"bcmkernel/include" -I/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/../../bcm504L04/bcm963xx_5.04L.04/kernel/linux-4.19/../"bcmkernel/include"/uapi" DESTDIR="/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/xtables-addons-3.0/ipkg-install" DEPMOD="/bin/true" all make[4]: Entering directory /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/xtables-addons-3.0’ (CDPATH=“${ZSH_VERSION+.}:” && cd . && /bin/sh /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/xtables-addons-3.0/build-aux/missing autoheader) rm -f stamp-h1 touch config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h config.status: config.h is unchanged make all-recursive make[5]: Entering directory /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/xtables-addons-3.0' Making all in extensions make[6]: Entering directory /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/xtables-addons-3.0/extensions’ Xtables-addons 3.0 - Linux 4.19.275 if [ -n “/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/…/…/bcm504L04/bcm963xx_5.04L.04/kernel/linux-4.19” ]; then make -C /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/…/…/bcm504L04/bcm963xx_5.04L.04/kernel/linux-4.19 M=/home/zhanggexu/newcode/be230_new/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/xtables-addons-3.0/extensions modules; fi; make[7]: Entering directory `/home/zhanggexu/newcode/be230_new/bcm504L04/bcm963xx_5.04L.04/kernel/linux-4.19’ CC [M] /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/xtables-addons-3.0/extensions/ACCOUNT/xt_ACCOUNT.o CC [M] /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/xtables-addons-3.0/extensions/LUA/xt_LUA_target.o /home/zhanggexu/newcode/be230_new/Iplatform/openwrt/build_dir/linux-model_brcm_bcm490x/xtables-addons-3.0/extensions/LUA/xt_LUA_target.c: In function ‘lua_tg’:
最新发布
10-25
### 解决 `zsh: command not found: config--add` 错误 当遇到 `zsh: command not found: config--add` 的错误时,通常是因为尝试在一个不存在或未正确配置的环境中运行 Git 命令。此问题可能源于环境变量设置不正确或是 Git 安装存在问题。 #### 1. 验证 Git 是否已安装并可用 确保 Git 已经被正确安装并且可以在终端中访问。可以通过以下命令验证: ```bash git --version ``` 如果该命令返回版本信息,则说明 Git 正常工作;反之则需重新安装 Git 或者修复现有安装[^4]。 #### 2. 更新 Shell Profile 文件 对于从 Bash 转向 Zsh 的用户来说,某些全局路径和自定义脚本可能尚未迁移到 `.zshrc` 中。打开用户的主目录下的隐藏文件`.zshrc` 并确认其中包含了必要的 PATH 变量声明以及任何其他所需的初始化逻辑[^2]。 编辑 `.zshrc` 文件的方法如下所示: ```bash nano ~/.zshrc ``` 在文件内添加或调整类似下面的内容来包含 Homebrew 和 Git 所必需的位置(假设通过 Homebrew 安装了 Git): ```bash export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" eval "$(rbenv init -)" # 如果使用 rbenv 等工具也需要相应配置 source $HOME/.bash_profile # 将旧版 bash 设置导入至 zsh (可选) ``` 保存更改后使这些改动生效: ```bash source ~/.zshrc ``` #### 3. 处理特定于 M1 Macs 的情况 针对 Apple Silicon 架构(M1芯片),有时需要特别处理才能让 SVN 或 Git 等开发工具正常运作。这涉及到利用 Rosetta 2 来兼容 Intel 应用程序或者是直接采用原生支持 ARM64 的构建版本[^3]。 #### 4. 检查并修正 Git Safe Directory 设置 由于提到过关于安全目录的问题,在 macOS 上可能会因为权限原因导致操作失败。因此建议按照官方文档指导完成相应的配置更新: ```bash git config --global --add safe.directory /path/to/your/project/folder ``` 注意替换 `/path/to/your/project/folder` 成实际项目的绝对路径地址。 以上措施应该能够帮助解决大多数情况下发生的 "command not found" 类型的问题。不过值得注意的是,“config--add”本身并不是有效的Git子命令形式——正确的应该是两个独立单词之间有空格分隔开来的“config --add”。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

智驾

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值