Error installing nRF connect SDK in VSCode (Linux) (libunistring.so.2: cannot open shared object file: No such file or directory)

Hi, I have an issue when I try to install the nRF connect SDK.
I am using Linux Fedora 39, trying to isntall SDK  v2.5.0.

Steps taken so far:

  • Download and install nRF command line tools
  • Download nRF connect extension pack for VSCode
  • In VSCode, succesfully installed toolchain v2.5.0

[22:26:54] nrfutil-toolchain-manager install v2.5.0: Download toolchain
[22:32:17] nrfutil-toolchain-manager install v2.5.0: Toolchain downloaded: success
[22:32:17] nrfutil-toolchain-manager install v2.5.0: Unpack toolchain
[22:32:30] nrfutil-toolchain-manager install v2.5.0: Toolchain unpacked to /home/eric/ncs/tmp/.tmpb49DV9: success
[22:32:30] nrfutil-toolchain-manager install v2.5.0: Install toolchain
[22:32:30] nrfutil-toolchain-manager install v2.5.0: Toolchain installed at /home/eric/ncs/toolchains/7795df4459: success
[22:32:30] =========== Toolchain validation report for nRF Connect SDK Toolchain v2.5.0 ===========

Then I select "Manage SDKs", "Install SDK", and then get the error below:

Command failed: git ls-remote --tags --heads https://github.com/nrfconnect/sdk-nrf
/home/eric/ncs/toolchains/7795df4459/usr/local/libexec/git-core/git-remote-https: error while loading shared libraries: libunistring.so.2: cannot open shared object file: No such file or directory

Interstingly, when I open the nRF connect appimage and go to the toolchain manager, it shows the SDK is installed, but that seems to be incorrect to me.

Here is the output from the nRF connect extension generate support output command:

{
  "platform": {
    "os": "linux",
    "osVersion": "#1 SMP PREEMPT_DYNAMIC Thu Dec 21 04:01:49 UTC 2023",
    "osKernel": "6.6.8-200.fc39.x86_64",
    "vscode": "1.85.1",
    "electron": "25.9.7",
    "node": "v18.15.0"
  },
  "system": {
    "date": "2023-12-28T22:42:16.308Z",
    "vscodeRoot": "/usr/share/code/resources/app",
    "nrfConnectForDesktopInstalled": "unknown",
    "vscodeUptime": "00:15:49",
    "osUptime": "00:16:46",
    "cpu": "AMD Ryzen 9 3900X 12-Core Processor"
  },
  "workspace": {
    "name": null,
    "workspaceFile": null,
    "folders": []
  },
  "sdks": [],
  "apps": [],
  "workspaceState": "empty-ready",
  "toolchains": [
    {
      "version": "2.5.0",
      "path": "/home/eric/ncs/toolchains/7795df4459"
    }
  ],
  "connectedDevices": [],
  "deviceProvider": "nrfutil",
  "tools": {
    "/home/eric/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc": "0.16.1",
    "/opt/SEGGER/JLink/JLinkExe": "7.94b",
    "/usr/local/bin/nrfjprog": "10.23.2",
    "nrfutil": "Not found",
    "/home/eric/ncs/toolchains/7795df4459/usr/local/bin/cmake": "3.20.5",
    "/home/eric/ncs/toolchains/7795df4459/usr/local/bin/west": "1.1.0",
    "/home/eric/ncs/toolchains/7795df4459/usr/local/bin/python3": "3.8.2",
    "/home/eric/ncs/toolchains/7795df4459/usr/local/bin/ninja": "1.9.0",
    "/home/eric/ncs/toolchains/7795df4459/usr/bin/gperf": "3.1",
    "/home/eric/ncs/toolchains/7795df4459/usr/bin/dtc": "1.4.7",
    "/home/eric/ncs/toolchains/7795df4459/opt/bin/gn": "1871",
    "/home/eric/ncs/toolchains/7795df4459/usr/local/bin/git": "2.37.3",
    "gdbPath": "/home/eric/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb"
  },
  "nrfutil": {
    "nrfutil-device": {
      "version": "2.0.0",
      "binPath": "/home/eric/.vscode/extensions/nordic-semiconductor.nrf-connect-2023.11.301-linux-x64/platform/nrfutil/bin/nrfutil-device"
    },
    "nrfutil-toolchain-manager": {
      "version": "0.14.1",
      "binPath": "/home/eric/.vscode/extensions/nordic-semiconductor.nrf-connect-2023.11.301-linux-x64/platform/nrfutil/bin/nrfutil-toolchain-manager"
    }
  },
  "environment": {
    "westEnv": {
      "ELECTRON_RUN_AS_NODE": "1",
      "GIT_EXEC_PATH": "/home/eric/ncs/toolchains/7795df4459/usr/local/libexec/git-core",
      "HOME": "/home/eric",
      "PATH": "/home/eric/ncs/toolchains/7795df4459/usr/bin:/home/eric/ncs/toolchains/7795df4459/usr/bin:/home/eric/ncs/toolchains/7795df4459/usr/local/bin:/home/eric/ncs/toolchains/7795df4459/opt/bin:/home/eric/ncs/toolchains/7795df4459/opt/nanopb/generator-bin:/home/eric/ncs/toolchains/7795df4459/opt/zephyr-sdk/aarch64-zephyr-elf/bin:/home/eric/ncs/toolchains/7795df4459/opt/zephyr-sdk/x86_64-zephyr-elf/bin:/home/eric/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin:/home/eric/.local/bin:/home/eric/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/eric/.local/bin:/home/eric/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin",
      "ZEPHYR_TOOLCHAIN_VARIANT": "zephyr",
      "ZEPHYR_SDK_INSTALL_DIR": "/home/eric/ncs/toolchains/7795df4459/opt/zephyr-sdk",
      "PYTHONPATH": "/home/eric/ncs/toolchains/7795df4459/usr/local/lib/python3.8:/home/eric/ncs/toolchains/7795df4459/usr/local/lib/python3.8/site-packages",
      "USER": "eric"
    },
    "inherited": {
      "ELECTRON_RUN_AS_NODE": "1",
      "HOME": "/home/eric",
      "PATH": "/home/eric/.local/bin:/home/eric/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin",
      "USER": "eric"
    },
    "toolchainPath": "/home/eric/ncs/toolchains/7795df4459",
    "toolchainBinPath": "/home/eric/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin",
    "toolchainVersion": "2.5.0"
  },
  "terminal": {
    "defaultProfile": null
  },
  "config": {
    "nordic-semiconductor.nrf-connect": {
      "topdir": "",
      "toolchain": {
        "path": "${nrf-connect.toolchain:2.5.0}"
      },
      "ozonePath": "",
      "applications": [],
      "applicationOptions": {},
      "kconfig": {
        "interface": "kconfig"
      },
      "west": {
        "env": {
          "$base": "terminal"
        }
      },
      "boardRoots": [],
      "taskBindings": {},
      "debugging": {
        "flash": true,
        "bindings": {},
        "justMyCode": true
      },
      "activeAppFollowActiveEditor": true,
      "deviceProvider": "",
      "flash": {
        "softreset": false,
        "erase": false,
        "recover": false
      },
      "enableTelemetry": false,
      "thirdpartyIntegration": {},
      "toolchainManager": {
        "indexURL": null,
        "installDirectory": null
      },
      "nrfutil": {
        "home": null
      },
      "defaultOpenAction": "ask"
    },
    "nordic-semiconductor.nrf-terminal": {
      "terminalMode": "character"
    }
  },
  "extensions": {
    "internal": {
      "nordic-semiconductor.nrf-connect": {
        "version": "2023.11.301",
        "path": "/home/eric/.vscode/extensions/nordic-semiconductor.nrf-connect-2023.11.301-linux-x64",
        "isActive": true
      },
      "nordic-semiconductor.nrf-terminal": {
        "version": "2023.10.17",
        "path": "/home/eric/.vscode/extensions/nordic-semiconductor.nrf-terminal-2023.10.17",
        "isActive": true
      },
      "nordic-semiconductor.nrf-devicetree": {
        "version": "2023.11.120",
        "path": "/home/eric/.vscode/extensions/nordic-semiconductor.nrf-devicetree-2023.11.120",
        "isActive": true
      },
      "nordic-semiconductor.nrf-kconfig": {
        "version": "2023.11.64",
        "path": "/home/eric/.vscode/extensions/nordic-semiconductor.nrf-kconfig-2023.11.64",
        "isActive": true
      }
    },
    "external": {
      "marus25.cortex-debug": null,
      "ms-vscode.cpptools": "1.18.5",
      "ms-vscode.js-debug": "1.85.0",
      "ms-vscode.js-debug-companion": "1.1.2",
      "ms-vscode.vscode-js-profile-table": "1.0.8",
      "marlinfirmware.auto-build": "2.1.51",
      "ms-python.isort": "2023.10.1",
      "ms-python.python": "2023.22.1",
      "ms-python.vscode-pylance": "2023.12.1",
      "ms-toolsai.jupyter": "2023.11.1003402403",
      "ms-toolsai.jupyter-keymap": "1.1.2",
      "ms-toolsai.jupyter-renderers": "1.0.17",
      "ms-toolsai.vscode-jupyter-cell-tags": "0.1.8",
      "ms-toolsai.vscode-jupyter-slideshow": "0.1.5",
      "ms-vscode.cpptools-extension-pack": "1.3.0",
      "ms-vscode.cpptools-themes": "2.0.0",
      "ms-vscode.vscode-serial-monitor": "0.11.0",
      "platformio.platformio-ide": "3.3.2",
      "trond-snekvik.gnu-mapfiles": "1.1.0",
      "vsciot-vscode.vscode-arduino": "0.6.0"
    }
  }
}

I am not sure how to proceed from here, any help is appreciated. (I am a Linux noob)

I have seen this existing post:  https://devzone.nordicsemi.com/f/nordic-q-a/104649/toolchain-manager-not-installing-all-dependencies

I tried running the command in that post to create a symbolic link, however when I try installing the SDK again, the same error above persists.

Parents
  • Ubuntu 24.10 I am also seeing this error.

    Command failed: git ls-remote --tags --heads github.com/.../sdk-nrf
    /home/xx/ncs/toolchains/e9dba88316/usr/local/libexec/git-core/git-remote-https: error while loading shared libraries: libunistring.so.2: cannot open shared object file: No such file or directory
    

    Tried sudo apt install libunistring-dev; that didn't help.  I believe I installed via .deb.  I installed the latest v2.7.0 toolchain.

    the machine has binaries:
    /snap/core22/1621/usr/lib/x86_64-linux-gnu/libunistring.so.2
    /snap/core22/1663/usr/lib/x86_64-linux-gnu/libunistring.so.2

    doing:
    sudo ln -s /snap/core22/1663/usr/lib/x86_64-linux-gnu/libunistring.so.2 /usr/lib/libunistring.so.2
    works.  hope this helps someone.

  • If git (libpsl) is installed,

    $ rm ~/ncs/toolchains/e9dba88316/usr/lib/x86_64-linux-gnu/libpsl.so.5*

    should also work.

Reply Children
No Data
Related