首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Docker使用Alphine构建SofteWare,错误为“安装:无法识别的选项:条形程序=条带”

Docker使用Alphine构建SofteWare,错误为“安装:无法识别的选项:条形程序=条带”
EN

Stack Overflow用户
提问于 2018-07-05 06:56:27
回答 1查看 735关注 0票数 1

我正在构建一个蚊子码头映像,当调用make install时,遇到以下错误信息:Instally: unrecognized选项:strie-Program=strip‘,请帮助,谢谢。

代码语言:javascript
复制
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文件的一部分:

代码语言:javascript
复制
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称为最后几行结果行:

代码语言:javascript
复制
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'
EN

回答 1

Stack Overflow用户

发布于 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文件。这句话也解决了我的问题:

代码语言:javascript
复制
sed -i -e "s|(INSTALL) -s|(INSTALL)|g" \
    -e 's|--strip-program=${CROSS_COMPILE}${STRIP}||' \
    */Makefile */*/Makefile

以上只是在执行make install时注释掉的-条形程序。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51185048

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档