https://github.com/cdr/code-server/discussions/2157
我是初学者 我没有电脑,所以我想在android(termux应用)中运行vscode 请一些帮助....
我已经下载了 https://github.com/cdr/code-server/releases/download/v3.5.0/code-server-3.5.0-linux-arm64.tar.gz
此博客 请有人建议...
-------------------------------------------- ------------------------------
感谢您的出色建议 @MorrisonChang 差不多可以了(下图)
但 当我打开浏览器时(下图)
并发生错误“ 错误:找不到绑定文件。已尝试:” (以下说明)
$ code-server
[2020-10-07T05:24:03.991Z] info Using config file ~/.config/code-server/config.yaml
[2020-10-07T05:24:06.342Z] info Using user-data-dir ~/.local/share/code-server
[2020-10-07T05:24:06.391Z] info code-server 3.5.0 de41646fc402b968ca6d555fdf2da7de9554d28a
[2020-10-07T05:24:06.428Z] info HTTP server listening on http://127.0.0.1:8080
[2020-10-07T05:24:06.429Z] info - Using password from ~/.config/code-server/config.yaml
[2020-10-07T05:24:06.430Z] info - To disable use `--auth none`
[2020-10-07T05:24:06.430Z] info - Not serving HTTPS Error: Could not locate the bindings file. Tried:
→ /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/build/spdlog.node
→ /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/build/Debug/spdlog.node
→ /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/build/Release/spdlog.node
→ /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/out/Debug/spdlog.node
→ /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/Debug/spdlog.node
→ /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/out/Release/spdlog.node
→ /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/Release/spdlog.node
→ /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/build/default/spdlog.node
→ /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/compiled/14.8.0/android/arm/spdlog.node
→ /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/addon-build/release/install-root/spdlog.node
→ /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/addon-build/debug/install-root/spdlog.node
→ /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/addon-build/default/install-root/spdlog.node
→ /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/lib/binding/node-v83-android-arm/spdlog.node
at bindings (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/bindings/bindings.js:126:9)
at Object.<anonymous> (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/index.js:3:35)
at Module._compile (internal/modules/cjs/loader.js:1251:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1272:10)
at Module.load (internal/modules/cjs/loader.js:1100:32)
at Function.Module._load (internal/modules/cjs/loader.js:962:14)
at Module.require (internal/modules/cjs/loader.js:1140:19)
at Module.patchedRequire [as require] (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/diagnostic-channel/dist/src/patchRequire.js:14:46)
at require (internal/modules/cjs/helpers.js:75:18)
at t.load (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:16:749)
at e.load (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:13:941)
at i (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:29:839)
at Object.errorback (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:29:963)
at e.triggerErrorback (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:14:306)
at /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:14:10
at ReadFileContext.callback (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:17:221)
at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:264:13) {
tries: [
'/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/build/spdlog.node',
'/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/build/Debug/spdlog.node',
'/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/build/Release/spdlog.node',
'/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/out/Debug/spdlog.node',
'/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/Debug/spdlog.node',
'/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/out/Release/spdlog.node',
'/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/Release/spdlog.node',
'/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/build/default/spdlog.node',
'/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/compiled/14.8.0/android/arm/spdlog.node',
'/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/addon-build/release/install-root/spdlog.node',
'/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/addon-build/debug/install-root/spdlog.node',
'/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/addon-build/default/install-root/spdlog.node',
'/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/spdlog/lib/binding/node-v83-android-arm/spdlog.node'
],
phase: 'loading',
moduleId: 'spdlog',
neededBy: [ '===anonymous3===' ]
}
[2020-10-07T06:05:50.597Z] warn vscode Unable to retrieve mac address (Error: Command failed: /sbin/ifconfig -a || /sbin/ip link
/data/data/com.termux/files/usr/bin/sh: 1: /sbin/ifconfig: Permission denied
/data/data/com.termux/files/usr/bin/sh: 1: /sbin/ip: Permission denied
)
[2020-10-07T06:06:01.430Z] warn vscode ENOENT: no such file or directory, scandir '/data/data/com.termux/files/home/.local/share/code-server/logs'
那我该怎么办? 请给我一些建议
答案 0 :(得分:1)
我找到了更好的解决方案。我安装了 proot-distro,然后安装了 parrot 发行版,然后我用这个 curl -fsSL https://code-server.dev/install.sh | sh
来安装它,现在它工作正常,所以请按照以下步骤
apt update
apt install proot-distro nano
proot-distro install ubuntu-20.04
proot-distro login ubuntu-20.04
在通过输入 proot-distro login ubuntu-20.04
登录您的 ubuntu 之后,现在复制此代码并粘贴它
curl -fsSL https://code-server.dev/install.sh | sh
code-server
安装后运行 code-server
,当你第一次运行它时,它会创建 ~/.config/code-server/config.yaml
文件,所以现在关闭服务器并使用 nano ~/.config/code-server/config.yaml
设置代码服务器的密码
bind-addr: 127.0.0.1:8080
auth: password
password: your-password
cert: none
如果您认为这是正确的过程,请为这个答案点赞
答案 1 :(得分:0)
VSCode已在Termux中提供。请注意,在执行说明时,您的互联网连接应该良好/稳定。
Termux内部:
pkg install nodejs
pkg install yarn
pkg install build-essential
pkg install python
yarn global add code-server
这需要一段时间。保持耐心。
code-server
或code-server &
,它们将在后台运行代码服务器。根据输出,密码在~/.config/code-server/config.yaml