Score:2

git: symbol lookup error: git: undefined symbol: pcre2_maketables_free_8

jp flag

Git is not working for me after updating to Kubuntu 21.10. When I try to execute any git commands I get the following error: git: symbol lookup error: git: undefined symbol: pcre2_maketables_free_8.

I've tried reinstalling git and all libraries related to PCRE2.

My current git version: git/impish,now 1:2.32.0-1ubuntu1 amd64 [installed]

Any idea what could cause this and how to fix it?

Edit: Running ldd $(which git) yields the following:

linux-vdso.so.1 (0x00007fff21f00000)
libpcre2-8.so.0 => /usr/local/lib/libpcre2-8.so.0 (0x00007f27ccb5b000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f27ccb3f000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f27cc917000)
/lib64/ld-linux-x86-64.so.2 (0x00007f27ccf62000)

Also, running nm -Dg /usr/local/lib/libpcre2-8.so.0 | grep "pcre2_maketables_free_8" does not return anything

frippe avatar
ug flag
Make sure that you have the required version of the lib and that `ld` can find it: `ldd $(which git)`
lyubolp avatar
jp flag
ldd $(which git) linux-vdso.so.1 (0x00007ffda5793000) libpcre2-8.so.0 => /usr/local/lib/libpcre2-8.so.0 (0x00007f341531e000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f3415302000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f34150da000) /lib64/ld-linux-x86-64.so.2 (0x00007f3415725000)
frippe avatar
ug flag
It's better if you update your question with that information instead, so that you can apply proper formatting. Also, you only addressed one part of my comment. While you're at it, you could also run `nm -Dg <path_to_lib> | grep pcre2_maketables_free_8` as a sanity check to see if the symbol is exported.
lyubolp avatar
jp flag
Ran `nm -Dg /usr/local/lib/libpcre2-8.so.0 | grep "pcre2_maketables_free_8"` - no results were returned
frippe avatar
ug flag
As I said in my first comment, check for version compatibility between the installed versions of `git` and `libpcre2`. The symbol git is looking for isn't there.
Score:3
zw flag

You have to remove local library and local Git, then reinstall Git with dependencies by

sudo rm -v $(which git)
sudo rm -v /usr/local/lib/libpcre2-8.so.0*

sudo apt-get install --reinstall git libc6 libpcre2-8-0 zlib1g

and then retry.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.