It’s currently almost 23:15, and I’m already sleepy. Therefore, this is going to be a short note on how I fixed an minor but annoying issue
nvim-treesiter (Neovim’s plugin) on openSUSE Leap (15.5).
The error message is or was as below:
nvim-treesitter[yaml]: Error during compilation cc: error trying to exec 'cc1plus': execvp: No such file or directory Press ENTER or type command to continue
I don’t code in C++ nowadays, but the error looks like the C or C++ compiler was missing. But first, let’s show the version of openSUSE running on this instance, I mean VM:
❯ cat /etc/os-release NAME="openSUSE Leap" VERSION="15.5" ID="opensuse-leap" ID_LIKE="suse opensuse" VERSION_ID="15.5" PRETTY_NAME="openSUSE Leap 15.5" ANSI_COLOR="0;32" CPE_NAME="cpe:/o:opensuse:leap:15.5" BUG_REPORT_URL="https://bugs.opensuse.org" HOME_URL="https://www.opensuse.org/" DOCUMENTATION_URL="https://en.opensuse.org/Portal:Leap" LOGO="distributor-logo-Leap"
According to this forum post , my VM is missing a package called
gcc-c++. Let’s verify that too:
thounchey2:~ # rpm -qi gcc-c++ package gcc-c++ is not installed
Right, let’s install this package with
thounchey2:~ # zypper install gcc-c++ Retrieving repository 'Update repository of openSUSE Backports' metadata ...................[done] Building repository 'Update repository of openSUSE Backports' cache ........................[done] Loading repository data... Reading installed packages... Resolving package dependencies... The following 3 NEW packages are going to be installed: gcc-c++ gcc7-c++ libstdc++6-devel-gcc7 3 new packages to install. Overall download size: 15.6 MiB. Already cached: 0 B. After the operation, additional 59.7 MiB will be used. Continue? [y/n/v/...? shows all options] (y): y ...<SNIP>...
neovim was restarted, the error message complaining “cc: error trying to exec cc1plus:…” has magically disappeared.