我正在构建一个蚊子码头映像,当调用make install时,遇到以下错误信息:Instally: unrecognized选项:strie-Program=strip‘,请帮助,谢谢。
install -d /usr/local/lib/
install -s --strip-program=strip libmosquitto.so.1
/usr/local/lib/libmosquitto.so.1
install: unrecognized option: strip-program=strip
BusyBox v1.27.2 (2017-12-12 10:41:50 GMT) multi-call binary.
Usage: install [-cdDsp] [-o USER] [-g GRP] [-m MODE] [-t DIR] [SOURCE]... DEST
Copy files and set attributes
-c Just copy (default)
-d Create directories
-D Create leading target directories
-s Strip symbol table
-p Preserve date
-o USER Set ownership
-g GRP Set group ownership
-m MODE Set permissions
-t DIR Install to DIR
make[1]: *** [Makefile:28: install] Error 1
make[1]: Leaving directory '/usr/local/src/mosquitto-1.4.15/lib'
make: *** [Makefile:38: install] Error 2我的Dockfile文件的一部分:
FROM alpine:3.7
RUN apk add --update --no-cache build-base openssl openssl-dev c-ares-dev util-linux-dev libwebsockets-dev libxslt && \
cd /usr/local && \
mkdir src && \
cd src && \
wget https://mosquitto.org/files/source/mosquitto-1.4.15.tar.gz && \
tar -zxvf mosquitto-1.4.15.tar.gz && \
cd mosquitto-1.4.15 && \
make && make install将make称为最后几行结果行:
cc -Wall -ggdb -O2 -c mosquitto_passwd.c -o mosquitto_passwd.o
cc mosquitto_passwd.o -o mosquitto_passwd -lcrypto
make[1]: Leaving directory '/usr/local/src/mosquitto-1.4.15/src'
set -e; for d in man; do make -C ${d}; done
make[1]: Entering directory '/usr/local/src/mosquitto-1.4.15/man'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/usr/local/src/mosquitto-1.4.15/man'发布于 2018-07-05 09:28:19
除了@mulg0r给我的答案。我发现还有别的办法可以解决这个问题。我认为这也是有用的,当有人遇到类似的问题。来自https://git.alpinelinux.org/cgit/aports/tree/main/mosquitto?h=master的这个链接。来自阿尔卑斯Linux的软件包。单击Git repository按钮,在该页面中,该包的构建过程说明就在那里。以及一些适合高寒Linux的代码更改。
有关此问题,请从https://git.alpinelinux.org/cgit/aports/tree/main/mosquitto?h=master中查找APKBUILD文件。这句话也解决了我的问题:
sed -i -e "s|(INSTALL) -s|(INSTALL)|g" \
-e 's|--strip-program=${CROSS_COMPILE}${STRIP}||' \
*/Makefile */*/Makefile以上只是在执行make install时注释掉的-条形程序。
https://stackoverflow.com/questions/51185048
复制相似问题