/ bin / sh: невозможно выполнить двоичный файл - PullRequest
0 голосов
/ 29 мая 2020

Я изменил https://github.com/feast-dev/feast/blob/master/Makefile#L147 на

install-dependencies-proto-docs:
    cd ${ROOT_DIR}/protos;
    rm -r $$HOME/bin
    rm -r $$HOME/include
    mkdir -p $$HOME/bin
    mkdir -p $$HOME/include
    go get github.com/golang/protobuf/proto && \
    go get github.com/russross/blackfriday/v2 && \
    cd $$(mktemp -d) && \
    git clone https://github.com/istio/tools.git && \
    cd tools/cmd/protoc-gen-docs && \
    go build && \
    cp protoc-gen-docs $$HOME/bin && \
    cd $$HOME && curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.11.2/protoc-3.11.2-linux-x86_64.zip && \
    unzip protoc-3.11.2-linux-x86_64.zip -d protoc3 && \
    mv protoc3/bin/* $$HOME/bin/ && \
    chmod +x $$HOME/bin/protoc && \
    mv protoc3/include/* $$HOME/include

Но когда я запустил make compile-protos-docs, я получил

$ make compile-protos-docs
cd /Users/c/others/feast/protos; protoc --docs_out=../dist/grpc feast/*/*.proto || \
        cd /Users/c/others/feast; /Library/Developer/CommandLineTools/usr/bin/make install-dependencies-proto-docs &&       cd /Users/c/others/feast/protos; PATH=$HOME/bin:$PATH protoc -I $HOME/include/ -I . --docs_out=../dist/grpc feast/*/*.proto
protoc-gen-docs: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
--docs_out: protoc-gen-docs: Plugin failed with status code 1.
cd /Users/c/others/feast/protos;
rm -r $HOME/bin
rm -r $HOME/include
mkdir -p $HOME/bin
mkdir -p $HOME/include
go get github.com/golang/protobuf/proto && \
        go get github.com/russross/blackfriday/v2 && \
        cd $(mktemp -d) && \
        git clone https://github.com/istio/tools.git && \
        cd tools/cmd/protoc-gen-docs && \
        go build && \
        cp protoc-gen-docs $HOME/bin && \
        cd $HOME && curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.11.2/protoc-3.11.2-linux-x86_64.zip && \
        unzip protoc-3.11.2-linux-x86_64.zip -d protoc3 && \
        mv protoc3/bin/* $HOME/bin/ && \
        chmod +x $HOME/bin/protoc && \
        mv protoc3/include/* $HOME/include
Cloning into 'tools'...
remote: Enumerating objects: 77, done.
remote: Counting objects: 100% (77/77), done.
remote: Compressing objects: 100% (55/55), done.
remote: Total 12090 (delta 34), reused 35 (delta 19), pack-reused 12013
Receiving objects: 100% (12090/12090), 18.55 MiB | 1.80 MiB/s, done.
Resolving deltas: 100% (5883/5883), done.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   641  100   641    0     0   4092      0 --:--:-- --:--:-- --:--:--  4108
100 1547k  100 1547k    0     0   998k      0  0:00:01  0:00:01 --:--:-- 1301k
Archive:  protoc-3.11.2-linux-x86_64.zip
replace protoc3/include/google/protobuf/type.proto? [y]es, [n]o, [A]ll, [N]one, [r]ename: A
  inflating: protoc3/include/google/protobuf/type.proto  
  ...   
/bin/sh: /Users/c/bin/protoc: cannot execute binary file
make: *** [compile-protos-docs] Error 126

Ошибки:

protoc-gen-docs: program not found or is not executable
/bin/sh: /Users/c/bin/protoc: cannot execute binary file

Но, еще получил

$ protoc
Usage: protoc [OPTION] PROTO_FILES
Parse PROTO_FILES and generate output based on the options given:
...
$ protoc-gen-docs
bash: protoc-gen-docs: command not found

Вроде бы protoc могу запустить, но не protoc-gen-docs. Я тоже не могу запустить make compile-protos-docs.

Есть идеи? Спасибо

...