: error while loading shared libraries

just installed a fresh new Pi OS and can’t git clone or curl getting an error (check below),

~ $ git clone https://github.com/SensorsIot/IOTstack.git IOTstack

Cloning into ‘IOTstack’…

/usr/lib/git-core/git-remote-https: error while loading shared libraries: libhogweed.so.4: cannot open shared object file: No such file or directory

The point is looking for libhogweed.so.4 but the installed version is libhogweed.so.6 !

How could i resolve this problem


Hey Huseyin,

What an interesting issue, I tried running

~$ git clone https://github.com/SensorsIot/IOTstack.git IOTstack

and was able to get a local copy of the repo without any issue. Seems it may be an issue with your local OS that you’ve got set up. Can you please run the following and check the version of git that you’ve got installed locally? We may need to ensure that some packages are up to date:

~$ sudo apt-get update && sudo apt-get upgrade && git --version

Also, if you can run

~$ git --exec-path

to confirm that it certainly points to /usr/lib/git-core it’s likely not the issue, but thought I’d check in case there’s something else going on with the configuration here.


thanks for the reply Bryce,

So I have changed my mind on the docker stack.

However, I reinstalled the raspbian os and the git worked again.

So I’m working on another pi and getting the same error for pihole =

error while loading shared libraries: libhogweed.so.4: cannot open shared object file: No such file or directory.

I don’t want to reinstall the os and start all of over again.

and when i do ~$ git --exec-path i can /usr/lib/git-core

and the git --version is git version 2.30.2



Hey Huseyin,

Interesting, that should be fine. Did you already run ~$ sudo apt-get update && sudo apt-get upgrade that I suggested earlier?

I’d suggest also running ~$ git update and trying again just want to make sure that we’re fully up to date before diving deeper if necessary.


Hey Bryce,

Done all the commands you suggested, none of them worked.

The solution for this problem is to reflash the os.

Currently, i flashed the os in 64bit instead of 32bit, luckily no issues at the moment finger’s crossed.


Hey Huseyin,

How strange, let us know if you run into any issues with that, also, does that occur when trying to clone any repo, or just https://github.com/SensorsIot/IOTstack.git specifically? And can you create repos locally by running ~$ git init and set up a remote origin for it, or is that functionality broken too?

1 Like