当前位置: 技术问答>linux和unix
关于 $(ARCH)的错误
来源: 互联网 发布时间:2016-09-25
本文导语: 我在debian系统下net-snmp-5.5的安装文件目录下执行下面的命令 ./configure --quiet --prefix=/tmp/snmp --target=$(ARCH)-linux --host=$(ARCH) --with-cc=$(ARCH)-linux-uclibc-gcc --with-ar=$(ARCH)-linux-uclibc-ar --with-endianness=little --with-cflags="$(COPTS)...
我在debian系统下net-snmp-5.5的安装文件目录下执行下面的命令
./configure --quiet --prefix=/tmp/snmp --target=$(ARCH)-linux --host=$(ARCH) --with-cc=$(ARCH)-linux-uclibc-gcc --with-ar=$(ARCH)-linux-uclibc-ar --with-endianness=little --with-cflags="$(COPTS) -DCAN_USE_SYSCTL=1 -ffunction-sections -fdata-sections -Wl,--gc-sections" --enable-mini-agent --disable-privacy --without-opaque-special-types --with-persistent-directory=/tmp/snmp-persist --with-default-snmp-version=3 --with-sys-contact=root --with-sys-location=Unknown --with-logfile=/dev/null --with-out-transports=UDPIPv6,TCPIPv6,AAL5PVC,IPX,TCP,Unix --enable-shared=no --enable-static --with-gnu-ld --enable-internal-md5 --with-copy-persistent-files=no --without-openssl -sysconfdir=/tmp --with-mib-modules=mibII,host,mibII/ip,mibII/tcp,mibII/udp,mibII/icmp,mibII/var_route,mibII/kernel_linux,ucd_snmp --with-out-mib-modules=host/hr_swrun,agent_mips,agentx,notification,utilities,target --disable-ipv6 --with-defaults --without-efence --without-rsaref --without-kmem-usage --without-rpm --without-dmalloc
提示如下错误:
bash: ARCH: command not found
bash: ARCH: command not found
bash: ARCH: command not found
bash: ARCH: command not found
bash: COPTS: command not found
configure: error: in `/home/dd-wrt/net-snmp-5.5':
configure: error: C compiler cannot create executables
请问该如何修正?
./configure --quiet --prefix=/tmp/snmp --target=$(ARCH)-linux --host=$(ARCH) --with-cc=$(ARCH)-linux-uclibc-gcc --with-ar=$(ARCH)-linux-uclibc-ar --with-endianness=little --with-cflags="$(COPTS) -DCAN_USE_SYSCTL=1 -ffunction-sections -fdata-sections -Wl,--gc-sections" --enable-mini-agent --disable-privacy --without-opaque-special-types --with-persistent-directory=/tmp/snmp-persist --with-default-snmp-version=3 --with-sys-contact=root --with-sys-location=Unknown --with-logfile=/dev/null --with-out-transports=UDPIPv6,TCPIPv6,AAL5PVC,IPX,TCP,Unix --enable-shared=no --enable-static --with-gnu-ld --enable-internal-md5 --with-copy-persistent-files=no --without-openssl -sysconfdir=/tmp --with-mib-modules=mibII,host,mibII/ip,mibII/tcp,mibII/udp,mibII/icmp,mibII/var_route,mibII/kernel_linux,ucd_snmp --with-out-mib-modules=host/hr_swrun,agent_mips,agentx,notification,utilities,target --disable-ipv6 --with-defaults --without-efence --without-rsaref --without-kmem-usage --without-rpm --without-dmalloc
提示如下错误:
bash: ARCH: command not found
bash: ARCH: command not found
bash: ARCH: command not found
bash: ARCH: command not found
bash: COPTS: command not found
configure: error: in `/home/dd-wrt/net-snmp-5.5':
configure: error: C compiler cannot create executables
请问该如何修正?
|
$(ARCH) 就把ARCH当命令来执行了
你是要引用ARCH变量吗 那就把$(ARCH)改成$ARCH
怎么不用apt-get安装呢
你是要引用ARCH变量吗 那就把$(ARCH)改成$ARCH
怎么不用apt-get安装呢
|
$(COPTS)只是Makefile里的一个变量, 推测的意思是用gcc编译代码时, 额外添加的编译选项...
不要尝试把Makefile里的命令直接Copy出来运行...
你需要做的是运行以下命令
make snmp-configure
不要尝试把Makefile里的命令直接Copy出来运行...
你需要做的是运行以下命令
make snmp-configure