libgit2-6311e88: cannot open shared object file: No such file or directory

环境 centos 7

dotnet core 2.1.4

错误信息:

   libgit2-xxxxxxx: cannot open shared object file: No such file or directory

原因:

  找不到动态库 libgit2-xxxxxxx.so

  libgit2-xxxxxxx.so未配置在LD_LIBRARY_PATH上

解决办法:

 按照以下说明编译native library

https://github.com/libgit2/libgit2sharp.nativebinaries

其中powershell脚本需要安装powershell

可以去github直接下载安装

sudo yum install https://github.com/PowerShell/PowerShell/releases/download/v6.1.0/powershell-6.1.0-1.rhel.7.x86_64.rpm

由于安装了preview版本

安装在了/usr/bin/pwsh-preview   类似的地方

修改可执行文件名称为 powershell 即可运行

之后安装说明编译

libgit2-6311e88: cannot open shared object file: No such file or directory

编译后 进入libgit2->build 执行make install后 问题解决

相关推荐