Libclang-11 not found

hello,everyone.
I have met a problem ,when i run ‘’./products/olympe/linux/env/postinst’’ according to the installation steps.
the problem is “unable to locate libclang-11-dev”. And this error will leads to further error bei ‘’ $ ./build.sh -p olympe-linux -A all final -j
I have tried the Installation both in Ubuntu 18.04 and Debian10.
I thought the real problem is clang-11 is too new and libclang-11.dev are not perfekt avaliable.
In Ubuntu is libclang-11.dev only avalible for groovy(which is new coming version).
In Debian is libclang-11.dev only avalible in some unstable or experimental sources. It will also leads to some new problems.
Have someone resolved this problem?

2 Likes

Running into the same issue here. Bellow is the error I am getting:

$ ./products/olympe/linux/env/postinst
>>> ...
>>> Reading state information... Done
>>> E: Unable to locate package libclang-11.-dev
>>> E: Couldn't find any package by glob 'libclang-11.-dev'
>>> E: Couldn't find any package by regex 'libclang-11.-dev'

Its weird, I ran through this installation a few weeks ago, and didn’t have this issue. I compared the postinst script from my previous run and my latest one and they are identical, so I don’t believe its something on Olympe’s side. Digging into the issue I believe the error comes from the following line in the postinst script:

CLANG_VERSION=$(/usr/bin/python3 -m pip show clang |grep '^Version' |cut -d' ' -f2 |cut -c1-3)

The command:

$ /usr/bin/python3 -m pip show clang |grep '^Version'
>>> Version: 11.0

As we can see it returns version 11, but that version is not available on Ubuntu 18.04. I will update this post if I find anymore.

Okay found a working solution (not sure if it’s the best one, but I just tested it and it works for me).

Short Answer:
Run the commands

# Install correct version of clang
$ sudo python3 -m pip uninstall clang
$ sudo python3 -m pip install clang==6.0.0.2
# Rerun the process that used to throw the error
$ cd code/parrot-groundsdk
$ ./products/olympe/linux/env/postinst

Long Answer
I did this whole install a few weeks ago on another machine without issue. From my previous post I realized that my new install has the clang version 11 installed:

$ python3 -m pip show clang 
>>> Name: clang
>>> Version: 11.0
>>> Summary: libclang python bindings
>>> ...

Running the same command on the machine where it worked I get the following:

$ python3 -m pip show clang 
>>> Name: clang
>>> Version: 6.0.0.2
>>> Summary: UNKNOWN
>>> ...

I am still not quite sure why or when clang version 11 is installed in the process. However to fix it I simply uninstalled version 11 and reinstalled version 6.0.0.2 using the commands:

# Remove the current clang
$ sudo python3 -m pip uninstall clang
# Install the correct version of clang
$ sudo python3 -m pip install clang==6.0.0.2
# Rerun the process
$ cd code/parrot-groundsdk
$ ./products/olympe/linux/env/postinst
1 Like

thanks a lot.I have also solved this Problem by modidy postinst file to install lower version of clang.
I think in debian it is safer to install clang6. In Ubuntu it is okay to install clang10

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.