Closed mpconte closed 1 week ago
You also have this problem: bash: line 99: ldd: command not found
Could there be something wrong with the PATH in this environment? What if you run
echo "wget --version" | ssh yourhostname bash
wget: unrecognized option '--version' BusyBox v1.22.1 (2018-11-05 13:31:17 EST) multi-call binary.
Usage: wget [-c|--continue] [-s|--spider] [-q|--quiet] [-O|--output-document FILE] [--header 'header: value'] [-Y|--proxy on/off] [-P DIR] [-U|--user-agent AGENT] [-T SEC] URL...
The ldd command isn't available on my system either
Ok, this probably won't work currently with just busybox
Would also want busybox supported, especially for embedded devices where ram is tight for VS Code Remote Server.
[12:23:41.816] > sh: bash: not found
[12:23:42.122] "install" terminal command done
IMHO, at least a SCP based fallback would be good i.e. download remotefile.sh locally over scp, and scp it back upon save.
Is there any hope to solve this suggestion?
Would folks interested be able to test with the current pre-release extension? There is an scp-based fallback that, given a read of this issue, may help certain workflows.
I just tried, using the latest pre-release "Remote -SSH" extension, to install VS Code Server on a Raspberry Pi 3B running Victron's VenusOS. VenusOS uses BusyBox, which does not correctly handle the installation script. Here is the relevant snippet from the output
[13:26:38.921] > Found existing installation at /home/root/.vscode-server...
> Starting VS Code CLI... "/home/root/.vscode-server/code-b1c0a14de1414fcdaa400695b4db1c0799bc3124" command-shell --cli-data-dir "/home/root/.vscode-server/cli" --on-port --on-host=127.0.0.1 --parent-process-id 4349 &> "/home/root/.vscode-server/.cli.b1c0a14de1414fcdaa400695b4db1c0799bc3124.log" < /dev/null
> printenv:
> main: line 79: printenv: command not found
[13:26:38.938] > main: line 56: 1722619599%N/1000000: division by 0 (error token is "N/1000000")
> Removing old logfile at /home/root/.vscode-server/.cli.b1c0a14de1414fcdaa400695b4db1c0799bc3124.log
[13:26:38.954] > Spawned remote CLI: 4380
[13:26:38.968] > ps: invalid option -- 'p'
> BusyBox v1.31.1 (2024-07-26 13:35:14 UTC) multi-call binary.Usage: ps
> Exec server process not found
>
[13:26:38.976] > main: line 56: 1722619599%N/1000000: division by 0 (error token is "N/1000000")
> main: line 64: - : syntax error: operand expected (error token is "- ")
Not sure how to trigger the scp-based fallback that you mentioned in your earlier post. Alternatively, if there a manual installation procedure? Any help would be much appreciated.
Regards, David
Thanks for testing @davidhoy. The scp-fallback should happen automatically if wget/curl fail to fetch the server. That said, looks like you're displaying a different issue. I'm going to get an environment set up and dig more in during this iteration.
Tomorrow's (morning Pacific time) pre-release of the extension drops the requirement for bash and as many non-standard features as I could find. The installation script has been heavily refactored to drop this requirement, so please give it a whirl and share how it goes!
I've validated against a clean Alpine install using v1.31.1 of busybox with success. The only things I needed to do out-of-the-box to establish a connection was:
AllowTcpForwarding
was set to yes
in the SSHD config (not the default value)libstdc++6
, which is a requirement for the VS Code server that is spawned
apk add --no-cache libstdc++6
The work tracked here also explicitly addresses:
Steps to Reproduce:
Even though wget is indeed installed on the remote machine.
which wget
/usr/bin/wget
Does this issue occur when you try this locally?: No Does this issue occur when you try this locally and all extensions are disabled?: Yes