No package 'libgvm_base' when building gvmd

GVM versions

gsad: 7.0.3
gvmd: N/A
openvas-scanner: N/A
gvm-libs: 21.4.4

Environment

Operating system: ubuntu-20.04.3-live-server-amd64
Kernel: Linux openvas 5.4.0-81-generic #91-Ubuntu SMP Thu Jul 15 19:09:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Installation method / source: Source, following official guide here

Hello All,

I am at my wits end with this issue. I am at the part of the official GVM documentation where I build/install gvmd. I have gotten through the prior steps without an issue as far as I can tell, and I have been trying to get past this single point without any luck.

It seems to be an issue with locating the package ‘libgvm_base’ when I run the cmake command. I have used the ‘locate libgvm_base’ command to see if the file was successfully installed, which if I’m not mistaken it is (refer to attached). I have had co workers look at this and help to no avail, I’ve looked through all relevant forum posts to no avail, and I kinda just ran out of ideas. So if someone could help me figure this out, I would be extremely grateful.

Please let me know if there is more information you need, and have a great day. Thanks.

Attached image:

Personally I would guess that /usr/lib64/pkgconfig is not in the search path for pkg-config. Try to set the environment variable PKG_CONFIG_PATH accordingly and re-run cmake again.

1 Like

I saw something similar.

Could you check that all files and symlinks are copied correctly?

sudo cp -rv $INSTALL_DIR/* /

You should see something like this:

ubuntu@server:~$ cd /usr/local/lib/
ubuntu@server:/usr/local/lib$ ll
total 8524
drwxr-xr-x  6 root root     4096 May 23 07:23 ./
drwxr-xr-x 10 root root     4096 May 11 23:24 ../
lrwxrwxrwx  1 root root       17 May 23 07:18 libgvm_base.so -> libgvm_base.so.21
lrwxrwxrwx  1 root root       21 May 23 07:18 libgvm_base.so.21 -> libgvm_base.so.21.4.4
-rw-r--r--  1 root root   110416 May 23 07:18 libgvm_base.so.21.4.4
lrwxrwxrwx  1 root root       19 May 23 07:18 libgvm_boreas.so -> libgvm_boreas.so.21
lrwxrwxrwx  1 root root       23 May 23 07:18 libgvm_boreas.so.21 -> libgvm_boreas.so.21.4.4
-rw-r--r--  1 root root    61112 May 23 07:18 libgvm_boreas.so.21.4.4
lrwxrwxrwx  1 root root       16 May 23 07:18 libgvm_gmp.so -> libgvm_gmp.so.21
lrwxrwxrwx  1 root root       20 May 23 07:18 libgvm_gmp.so.21 -> libgvm_gmp.so.21.4.4
-rw-r--r--  1 root root    35136 May 23 07:18 libgvm_gmp.so.21.4.4
lrwxrwxrwx  1 root root       16 May 23 07:18 libgvm_osp.so -> libgvm_osp.so.21
lrwxrwxrwx  1 root root       20 May 23 07:18 libgvm_osp.so.21 -> libgvm_osp.so.21.4.4
-rw-r--r--  1 root root    36544 May 23 07:18 libgvm_osp.so.21.4.4
lrwxrwxrwx  1 root root       17 May 23 07:18 libgvm_util.so -> libgvm_util.so.21
lrwxrwxrwx  1 root root       21 May 23 07:18 libgvm_util.so.21 -> libgvm_util.so.21.4.4
-rw-r--r--  1 root root   142344 May 23 07:18 libgvm_util.so.21.4.4
1 Like

So you’re saying that $PKG_CONFIG_PATH should be set to /usr/lib64/pkgconfig? If that’s the case, then I already have it set. If not, then what should the variable be assigned to?

see:
image

Sooo I ran the first line, sudo cp -rv $INSTALL_DIR/* /, and this is what it gave me:

image
Which, I can guess, is not what I should be getting. Does this mean that something went wrong along the install process?

The next part might shed some light as to what’s going on, but I admittedly am way out of my pay grade here so I don’t know exactly what I’m looking at. I’m just doing as you guys are saying and hoping for the best. Here’s what I’m talking about:

image

Which looks like it’s missing quite a few things compared to what you expected the output to be. Maybe I’m in a wrong directory or something, maybe I completely flubbed the install somewhere along the line. I’m going through the process again on a separate VM to see if I run into this problem again, so we’ll see if I missed a step or something initially.

Thanks again for your help.

Hi, please follow https://greenbone.github.io/docs/ as close as possible. For me it seems you are mixing up different install prefixes. I am really sure /usr/lib64 will not be used at all when following the guide.

1 Like

I have tried different INSTALL_PREFIX variables, firstly the /usr/local/ one suggested by the guide. As part of my initial troubleshooting, I wanted to see if I could force the prefix to go exactly where I thought the file was, based off of running locate libgvm_base as mentioned earlier. I have been following the guide to a T otherwise, apologies for not clarifying this. This is what is returned when I run cmake with INSTALL_PREFIX=/usr/local/:

Okay, I just went through the entire process again on a new VM, and I was able to get past this part without a hitch. I have absolutely no clue what I did wrong the first time around, but this second run I was extra punctual with my commands and making sure everything was fine before moving on to further instructions. So I guess this can be closed now, I hope to not have any issues going forward :grinning:. Thanks for the help guys and have a great day.

3 Likes