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/ld-linux-x86-64.so.2, 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
        linux-vdso.so.1 (0x00007ffc2fdee000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007faa01dd8000)
        librt.so.1 => /lib64/librt.so.1 (0x00007faa01dce000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007faa01c4a000)
        libm.so.6 => /lib64/libm.so.6 (0x00007faa01ac7000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007faa01aad000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007faa01a8c000)
        libc.so.6 => /lib64/libc.so.6 (0x00007faa018c9000)
        /lib64/ld-linux-x86-64.so.2 (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.