Connecting Visual Studio Code to a VM running Raspberry Pi Desktop (Raspbian)

Here is the situation, I have Raspberry Pi Desktop running in a VM and Visual Studio Code on my machine. When I try connect to my Raspberry Pi Desktop using VS Code Remote Development, I receive the error node: not found. When checking the files on the side of the Raspberry Pi Desktop, the node file is there and running the file results in:

$ ./node
-bash: ./node: No such file or directory

Running the command file node results in:

$ file node
node: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/, for GNU/Linux 2.6.32, BuildID[sha1]=831d85545809936623bbe700e5ef1e4d5965512c, with debug_info, not stripped

And running the command ldd node shows the output:

$ ldd node
        not a dynamic executable

Don’t ask for details, but installing gcc-multilib solved the issue:

$ sudo apt-get install gcc-multilib

A coffee later and running ldd node shows the shared libraries:

$ ldd node (0x00007ffc2fdee000) => /lib64/ (0x00007faa01dd8000) => /lib64/ (0x00007faa01dce000) => /usr/lib64/ (0x00007faa01c4a000) => /lib64/ (0x00007faa01ac7000) => /lib64/ (0x00007faa01aad000) => /lib64/ (0x00007faa01a8c000) => /lib64/ (0x00007faa018c9000)
        /lib64/ (0x00007faa01df7000)

And I was able to connect using visual studio code.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.