Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error install on ubuntu 22.04 arm, my openvpn is installed by deb file. #200

Open
ghost opened this issue Apr 29, 2023 · 1 comment
Open

Comments

@ghost
Copy link

ghost commented Apr 29, 2023

=> ERROR [frontend-builder 3/3] RUN cd /app && npm install && npm run build 46.2s

[frontend-builder 3/3] RUN cd /app && npm install && npm run build:
#0 1.349 npm WARN old lockfile
#0 1.350 npm WARN old lockfile The package-lock.json file was created with an old version of npm,
#0 1.351 npm WARN old lockfile so supplemental metadata must be fetched from the registry.
#0 1.351 npm WARN old lockfile
#0 1.352 npm WARN old lockfile This is a one-time fix-up, please be patient...
#0 1.352 npm WARN old lockfile
#0 32.69 npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
#0 33.24 npm WARN deprecated [email protected]: this library is no longer supported
#0 33.87 npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142
#0 34.43 npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
#0 35.51 npm WARN deprecated [email protected]: Formdata complete broken, incorrect build size
#0 36.36 npm WARN deprecated [email protected]: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
#0 45.90 npm notice
#0 45.90 npm notice New major version of npm available! 8.19.2 -> 9.6.5
#0 45.90 npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.6.5
#0 45.90 npm notice Run npm install -g [email protected] to update!
#0 45.90 npm notice
#0 45.90 npm ERR! code 1
#0 45.90 npm ERR! path /app/node_modules/node-sass
#0 45.91 npm ERR! command failed
#0 45.91 npm ERR! command sh -c -- node scripts/build.js
#0 45.91 npm ERR! Building: /usr/local/bin/node /app/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
#0 45.91 npm ERR! gyp info it worked if it ends with ok
#0 45.91 npm ERR! gyp verb cli [
#0 45.91 npm ERR! gyp verb cli '/usr/local/bin/node',
#0 45.91 npm ERR! gyp verb cli '/app/node_modules/node-gyp/bin/node-gyp.js',
#0 45.91 npm ERR! gyp verb cli 'rebuild',
#0 45.91 npm ERR! gyp verb cli '--verbose',
#0 45.91 npm ERR! gyp verb cli '--libsass_ext=',
#0 45.91 npm ERR! gyp verb cli '--libsass_cflags=',
#0 45.91 npm ERR! gyp verb cli '--libsass_ldflags=',
#0 45.91 npm ERR! gyp verb cli '--libsass_library='
#0 45.91 npm ERR! gyp verb cli ]
#0 45.91 npm ERR! gyp info using [email protected]
#0 45.91 npm ERR! gyp info using [email protected] | linux | arm64
#0 45.91 npm ERR! gyp verb command rebuild []
#0 45.91 npm ERR! gyp verb command clean []
#0 45.91 npm ERR! gyp verb clean removing "build" directory
#0 45.91 npm ERR! gyp verb command configure []
#0 45.91 npm ERR! gyp verb find Python Python is not set from command line or npm configuration
#0 45.91 npm ERR! gyp verb find Python Python is not set from environment variable PYTHON
#0 45.91 npm ERR! gyp verb find Python checking if "python3" can be used
#0 45.91 npm ERR! gyp verb find Python - executing "python3" to get executable path
#0 45.91 npm ERR! gyp verb find Python - "python3" is not in PATH or produced an error
#0 45.91 npm ERR! gyp verb find Python checking if "python" can be used
#0 45.91 npm ERR! gyp verb find Python - executing "python" to get executable path
#0 45.91 npm ERR! gyp verb find Python - "python" is not in PATH or produced an error
#0 45.91 npm ERR! gyp ERR! find Python
#0 45.91 npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
#0 45.91 npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
#0 45.91 npm ERR! gyp ERR! find Python checking if "python3" can be used
#0 45.91 npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
#0 45.91 npm ERR! gyp ERR! find Python checking if "python" can be used
#0 45.91 npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error
#0 45.91 npm ERR! gyp ERR! find Python
#0 45.91 npm ERR! gyp ERR! find Python **********************************************************
#0 45.91 npm ERR! gyp ERR! find Python You need to install the latest version of Python.
#0 45.91 npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
#0 45.91 npm ERR! gyp ERR! find Python you can try one of the following options:
#0 45.91 npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
#0 45.91 npm ERR! gyp ERR! find Python (accepted by both node-gyp and npm)
#0 45.91 npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
#0 45.91 npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
#0 45.91 npm ERR! gyp ERR! find Python npm config set python "/path/to/pythonexecutable"
#0 45.91 npm ERR! gyp ERR! find Python For more information consult the documentation at:
#0 45.91 npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
#0 45.91 npm ERR! gyp ERR! find Python **********************************************************
#0 45.91 npm ERR! gyp ERR! find Python
#0 45.91 npm ERR! gyp ERR! configure error
#0 45.91 npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
#0 45.91 npm ERR! gyp ERR! stack at PythonFinder.fail (/app/node_modules/node-gyp/lib/find-python.js:330:47)
#0 45.91 npm ERR! gyp ERR! stack at PythonFinder.runChecks (/app/node_modules/node-gyp/lib/find-python.js:159:21)
#0 45.91 npm ERR! gyp ERR! stack at PythonFinder. (/app/node_modules/node-gyp/lib/find-python.js:202:16)
#0 45.91 npm ERR! gyp ERR! stack at PythonFinder.execFileCallback (/app/node_modules/node-gyp/lib/find-python.js:294:16)
#0 45.91 npm ERR! gyp ERR! stack at exithandler (node:child_process:410:5)
#0 45.91 npm ERR! gyp ERR! stack at ChildProcess.errorhandler (node:child_process:422:5)
#0 45.91 npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)
#0 45.91 npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
#0 45.91 npm ERR! gyp ERR! stack at onErrorNT (node:internal/child_process:485:16)
#0 45.91 npm ERR! gyp ERR! stack at processTicksAndRejections (node:internal/process/task_queues:83:21)
#0 45.91 npm ERR! gyp ERR! System Linux 5.15.0-1033-oracle
#0 45.91 npm ERR! gyp ERR! command "/usr/local/bin/node" "/app/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
#0 45.91 npm ERR! gyp ERR! cwd /app/node_modules/node-sass
#0 45.91 npm ERR! gyp ERR! node -v v16.18.1
#0 45.91 npm ERR! gyp ERR! node-gyp -v v8.4.1
#0 45.91 npm ERR! gyp ERR! not ok
#0 45.91 npm ERR! Build failed with error code: 1
#0 45.91
#0 45.91 npm ERR! A complete log of this run can be found in:
#0 45.91 npm ERR! /root/.npm/_logs/2023-04-29T00_30_19_260Z-debug-0.log

@harakka
Copy link

harakka commented Jun 24, 2023

You can get it to build at least with the following changes. No clue if it actually works properly.

diff --git a/Dockerfile b/Dockerfile
index 42ff620..d60be0b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,17 +1,17 @@
 FROM node:16-alpine3.15 AS frontend-builder
 COPY frontend/ /app
-RUN cd /app && npm install && npm run build
+RUN apk add python3 make g++ && cd /app && npm install && npm run build

 FROM golang:1.17.3-buster AS backend-builder
 RUN go install github.com/gobuffalo/packr/v2/packr2@latest
 COPY --from=frontend-builder /app/static /app/frontend/static
 COPY . /app
-RUN cd /app && packr2 && env CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -a -tags netgo -ldflags '-linkmode external -extldflags -static -s -w' -o ovpn-admin && packr2 clean
+RUN cd /app && packr2 && env CGO_ENABLED=1 GOOS=linux GOARCH=arm64 go build -a -tags netgo -ldflags '-linkmode external -extldflags -static -s -w' -o ovpn-admin && packr2 clean

 FROM alpine:3.16
 WORKDIR /app
 COPY --from=backend-builder /app/ovpn-admin /app
 RUN apk add --update bash easy-rsa openssl openvpn coreutils  && \
     ln -s /usr/share/easy-rsa/easyrsa /usr/local/bin && \
-    wget https://github.com/pashcovich/openvpn-user/releases/download/v1.0.4/openvpn-user-linux-amd64.tar.gz -O - | tar xz -C /usr/local/bin && \
+    wget https://github.com/pashcovich/openvpn-user/releases/download/v1.0.4/openvpn-user-linux-arm64.tar.gz -O - | tar xz -C /usr/local/bin && \
     rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant