我在 mac m1、docker、gulp 上運行。我的第一個錯誤是找不到命令 ld,但我在這里修復了它。如何解決 running gcc failed exist status 1 in mac m1?之后它導致我出現這個錯誤。這是完整的錯誤:[17:09:04] 'restart-supervisor' errored after 1.04 s[17:14:45] '<anonymous>' errored after 220 ms[17:14:45] Error in plugin "gulp-shell"Message: Command `supervisorctl restart projectname` failed with exit code 7[17:14:45] 'restart-supervisor' errored after 838 ms我做了很多研究:我試過這樣做,但找不到命令。https://github.com/Supervisor/supervisor/issues/121這也是。 https://github.com/Supervisor/supervisor/issues/1223。我什至把我的形象改成arm64v8/golang:1.17-alpine3.14這是我的 gulpfile.js:var gulp = require("gulp");var shell = require('gulp-shell');gulp.task("build-binary", shell.task('go build'));gulp.task("restart-supervisor", gulp.series("build-binary", shell.task('supervisorctl restart projectname')))gulp.task('watch', function() { gulp.watch([ "*.go", "*.mod", "*.sum", "**/*.go", "**/*.mod", "**/*.sum" ], {interval: 1000, usePolling: true}, gulp.series('build-binary', 'restart-supervisor' ));});gulp.task('default', gulp.series('watch'));這是我當前的 dockerfile:FROM arm64v8/golang:1.17-alpine3.14RUN apk update && apk add gcc make git libc-dev binutils-gold# Install dependenciesRUN apk add --update tzdata \ --no-cache ca-certificates git wget \ nodejs npm \ g++ \ supervisor \ && update-ca-certificates \ && npm install -g gulp gulp-shellCOPY ops/api/local/supervisor /etcENV PATH $PATH:/go/binWORKDIR /go/src/github.com/projectname/src/api在我的 docker-compose.yaml 我有這個:entrypoint: [ "sh", "-c", "npm install gulp gulp-shell && supervisord -c /etc/supervisord.conf && gulp" ]vim /etc/supervisord.conf: #!/bin/sh[unix_http_server] file=/tmp/supervisor.sock username=admin password=revproxy 但說真的,這個 mac m1 有什么問題。我試過在 rosetta 和非 rosetta 版本 2 中這樣做。如果我的問題標題有誤,請糾正我,我也不確定我的錯誤。
- 1 回答
- 0 關注
- 178 瀏覽
添加回答
舉報
0/150
提交
取消