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
  • Hi,

     

    The toolchain installer is aimed towards ubuntu, and may not work with other distros.

    Make sure that you have libunistring installed (use dnf or yum in fedora).

    If you have a different version than what is expected in the toolchain installer, you need to symlink that to the expected one.

    You can find your libunistring file name by issuing this command:

    find /usr/lib -name "libunistring*"

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    The toolchain installer is aimed towards ubuntu, and may not work with other distros.

    Make sure that you have libunistring installed (use dnf or yum in fedora).

    If you have a different version than what is expected in the toolchain installer, you need to symlink that to the expected one.

    You can find your libunistring file name by issuing this command:

    find /usr/lib -name "libunistring*"

     

    Kind regards,

    Håkon

Children
Related