You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new version can't run, DEP can't install incompatible system, code package can't run, can't create / usr / local / bin directory, I don't have root permission, I hope the author can change the code package directory to the current user's home directory.
新版的无法运行,dep无法安装不兼容我的系统,code 包无法运行无法创建/usr/local/bin目录 我没有root权限,希望作者能把code包目录改为当前用户家目录.
I'm crazy.
$ ./code-server
./code-server: 20: exec: /data/data/com.termux/files/home/code-server-3.3.1-linux-arm64/bin/../lib/node: not found
$ dpkg -i code-server_3.3.1_arm64.deb
dpkg: error processing archive code-server_3.3.1_arm64.deb (--install):
package architecture (arm64) does not match system (aarch64)
Errors were encountered while processing:
code-server_3.3.1_arm64.deb
No idea, don't know what termux or what's causing this issue.
Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required. A minimal base system is installed automatically - additional packages are available using the APT package manager.
No idea, don't know what termux or what's causing this issue.
Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required. A minimal base system is installed automatically - additional packages are available using the APT package manager.
Some Android phones are connected to the display, such as Samsung, Huawei and smartisan phones, to realize Android programming and development
Here's a summary of the issues I ran into trying this out. My initial post is below the line.
There's a linker problem with the bundled Node (incorrect path).
There's a libstdc++.so error with spdlog if you try running with your own Node. (This might be fixed soon?) Already fixed as long as you use the bundled script, for example editing it to use your own Node for now
npm and yarn both result in Could not locate the bindings file with spdlog (was hoping this would work around the missing libraries)
Termux has a custom install path that the deb doesn't take into account.
Huh yeah that's interesting, the deb won't install because arm64 doesn't match aarch64? I thought they were the same thing?
I was able to get around that with:
$ dpkg --add-architecture arm64
However this still fails because it's trying to install to /usr. There is a PREFIX environment variable although it's one level too deep:
I'm not sure if we can fix this on our end; I'm not familiar enough with either termux or dpkg. Maybe there is some system default set somewhere that we can inherit or maybe debs have to be specially packaged for Termux to account for the path difference or maybe there's some other way to detect the right path like using that PREFIX environment variable if it exists.
Unfortunately running code-server still doesn't work at this point because it's trying to execute /usr/lib/code-server/bin/code-server. I tried running $PREFIX/lib/code-server/bin/code-server directly but node exits with no such file or directory. I think what it really means is there is some kind of missing library because the file does exist.
And it almost works! But it errors with libstdc++.so.6 not found when loading the spdlog module.
Then I tried out the npm module:
npm -g install code-server
But now I get Could not locate the bindings file for spdlog after running code-server and logging in. I don't know what's causing this one.
Going back to the no such file error:
$ file "$PREFIX/lib/code-server/lib/node"
/data/data/com.termux/files/usr/lib/code-server/lib/node: ELF 64-bit LSB executable, ARM aarch64, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=8de174bf29b02b0e727ca5cd7c4ede9ef35bb8cc, with debug_info, not stripped
Is it because /lib/ld-linux-aarch64.so.1 doesn't exist, maybe? Here's what I get for git:
This can answer everything https://github.com/vhqtvn/VHEditor-Android
It's an app with built in termux and vscs
And working perfectly except the c# extension didn't detect the arch of my device
Anyway the editor is working
Here is what I got with the 'yarn' method in a fresh Termux environment. The web page shows 500 Error.
Error: Cannot find module 'semver-umd'
Require stack:
- /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/bootstrap-amd.js
- /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/server/fork.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88: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:273:13) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/bootstrap-amd.js',
'/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/server/fork.js'
],
phase: 'loading',
moduleId: 'semver-umd',
neededBy: [
'vs/platform/extensionManagement/node/extensionDownloader',
'vs/workbench/services/extensions/node/extensionPoints',
'vs/platform/extensionManagement/node/extensionsScanner',
'vs/platform/extensionManagement/node/extensionManagementService'
]
}
Error: Cannot find module 'applicationinsights'
Require stack:
- /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/bootstrap-amd.js
- /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/server/fork.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88: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:273:13) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/bootstrap-amd.js',
'/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/server/fork.js'
],
phase: 'loading',
moduleId: 'applicationinsights',
neededBy: [ 'vs/platform/telemetry/node/appInsightsAppender' ]
}
Error: Cannot find module '@coder/node-browser'
Require stack:
- /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/bootstrap-amd.js
- /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/server/fork.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88: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:273:13) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/bootstrap-amd.js',
'/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/server/fork.js'
],
phase: 'loading',
moduleId: '@coder/node-browser',
neededBy: [ 'vs/server/node/channel' ]
}
Error: Cannot find module 'yauzl'
Require stack:
- /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/bootstrap-amd.js
- /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/server/fork.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88: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:273:13) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/bootstrap-amd.js',
'/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/server/fork.js'
],
phase: 'loading',
moduleId: 'yauzl',
neededBy: [ 'vs/base/node/zip' ]
}
Error: Cannot find module 'yazl'
Require stack:
- /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/bootstrap-amd.js
- /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/server/fork.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88: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:273:13) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/bootstrap-amd.js',
'/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/server/fork.js'
],
phase: 'loading',
moduleId: 'yazl',
neededBy: [ 'vs/base/node/zip' ]
}
If I installed the missing modules by "yarn global add semver-umd applicationinsights @coder/node-browser yauzl yazl spdlog"
I dont' get any error, but the web page is blank.
It seems the folder
"home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules" is missing. What shall I do now? I tried to npm install or yarn install inside /lib/vscode, but get more errors:
"error /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/keytar: Command failed." "No package 'libsecret-1' found"
Activity
871690991 commentedon May 27, 2020
Version: code-server_3.3.1_arm64.deb code-server-3.3.1-linux-arm64.tar.gz
OS: aarch64
nhooyr commentedon May 27, 2020
What does
dpkg --print-architectureshow?nhooyr commentedon May 27, 2020
Also, please provide your OS version, i.e debian/ubuntu/centOS/macOS/Windows etc.
nhooyr commentedon May 27, 2020
code-server --version:nhooyr commentedon May 28, 2020
Try using our auto install script.
See https://github.com/cdr/code-server#getting-started
871690991 commentedon May 28, 2020
My operating system is termux on Android
871690991 commentedon May 28, 2020
Can the next version be compatible with termux?
nhooyr commentedon May 28, 2020
No idea, don't know what termux or what's causing this issue.
871690991 commentedon May 28, 2020
The old version of termux can run directly, but the new version cannot. Do you have an Android phone to download a termux,you open http://termux.com
871690991 commentedon May 28, 2020
Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required. A minimal base system is installed automatically - additional packages are available using the APT package manager.
871690991 commentedon May 28, 2020
Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required. A minimal base system is installed automatically - additional packages are available using the APT package manager.
Some Android phones are connected to the display, such as Samsung, Huawei and smartisan phones, to realize Android programming and development
code-asher commentedon May 28, 2020
Here's a summary of the issues I ran into trying this out. My initial post is below the line.
There's aAlready fixed as long as you use the bundled script, for example editing it to use your own Node for nowlibstdc++.soerror withspdlogif you try running with your own Node. (This might be fixed soon?)npmandyarnboth result inCould not locate the bindings filewithspdlog(was hoping this would work around the missing libraries)Huh yeah that's interesting, the deb won't install because arm64 doesn't match aarch64? I thought they were the same thing?
I was able to get around that with:
However this still fails because it's trying to install to
/usr. There is aPREFIXenvironment variable although it's one level too deep:I'm not sure if we can fix this on our end; I'm not familiar enough with either termux or dpkg. Maybe there is some system default set somewhere that we can inherit or maybe debs have to be specially packaged for Termux to account for the path difference or maybe there's some other way to detect the right path like using that
PREFIXenvironment variable if it exists.Unfortunately running
code-serverstill doesn't work at this point because it's trying to execute/usr/lib/code-server/bin/code-server. I tried running$PREFIX/lib/code-server/bin/code-serverdirectly butnodeexits withno such file or directory. I think what it really means is there is some kind of missing library because the file does exist.So I installed Node:
And it almost works! But it errors with
libstdc++.so.6 not foundwhen loading thespdlogmodule.Then I tried out the npm module:
But now I get
Could not locate the bindings fileforspdlogafter runningcode-serverand logging in. I don't know what's causing this one.Going back to the
no such fileerror:Is it because
/lib/ld-linux-aarch64.so.1doesn't exist, maybe? Here's what I get forgit:So how about:
Unfortunately this results in:
code-asher commentedon May 28, 2020
One other summary item:
[-]/lib/node: not found Major issues, I'm crazy[/-][+]Unable to run on Android using Termux[/+]23 remaining items
chakibchemso commentedon Oct 12, 2020
This can answer everything
https://github.com/vhqtvn/VHEditor-Android
It's an app with built in termux and vscs
And working perfectly except the c# extension didn't detect the arch of my device
Anyway the editor is working
izewang commentedon Oct 23, 2020
Here is what I got with the 'yarn' method in a fresh Termux environment. The web page shows 500 Error.
If I installed the missing modules by "yarn global add semver-umd applicationinsights @coder/node-browser yauzl yazl spdlog"
I dont' get any error, but the web page is blank.
Here is the -vvv log
It seems the folder
"home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules" is missing. What shall I do now? I tried to npm install or yarn install inside /lib/vscode, but get more errors:
"error /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/keytar: Command failed." "No package 'libsecret-1' found"
izewang commentedon Oct 23, 2020
I finally got it worked.
Here's what I did after the previous post:
yozman commentedon Nov 4, 2020
hey guys, there is whole lots of things u should do for use cdr on termux
make sure your internet could open https://raw.githubusercontent.com/googleinterns/tsec/master/package.json correctly
if not (somewhere like china) u can use https://github.com/x-falcon/Virtual-Hosts for binding custom host like
after this, u can enjoy ur cdr on ur phone.
but there is still an issue on it with search feature
update for fix search feature
ripgrepusepkgln -srun this command in ur
code-serverdirectoryln -s $PREFIX/bin/rg ./lib/vscode/node_modules/vscode-ripgrep/bin/rgtranqy commentedon Dec 29, 2020
Thanks @yozman , that worked for me. I had tried a few other ways but was able to pkg uninstall yarn, reinstall yarn then reinstall code-server.
mahdimataji commentedon Jan 26, 2021
Hello Please solve this problem for me
n3rdw1z4rd commentedon Mar 16, 2021
This also worked for me, thank you!
jsjoeio commentedon Mar 16, 2021
Now that we have some official documentation for Termux, I think we should add this there.
TODOs:
[-]Unable to run on Android using Termux[/-][+]update Termux docs[/+]