如何在Alipne linux上安装libgit2 [英] How do I install libgit2 on Alipne linux

查看:679
本文介绍了如何在Alipne linux上安装libgit2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Docker的新人,试图在我的项目中使用阿尔卑斯泊坞码头。我尝试构建项目时出现以下错误。

  gopkg.in/libgit2/git2go.v22 
#pkg-config --cflags libgit2
pkg-config:exec:pkg-config:$ PATH中找不到可执行文件

我想我需要安装libgit2,但是我不能:

  bash-4.3#apk添加libgit2 
错误:不满意的约束:
libgit2(缺少):
需要由:world [libgit2]

感谢任何帮助。



-dj

解决方案

libgit2 不存在于 main 社区在标准Alpine映像中预先配置的存储库,因此您必须先添加测试 repo:



#echo http://dl-4.alpinelinux.org/alpine/edge/testing>> / etc / apk / repositories



然后更新包缓存:



#apk update



最后安装 libgit2



#apk add libgit2


I am new to Docker and trying to use an Alpine docker image for my project. I am getting the following error when I am try to build the project.

gopkg.in/libgit2/git2go.v22
# pkg-config --cflags libgit2
pkg-config: exec: "pkg-config": executable file not found in $PATH

I think I need to install libgit2 but I am not able to:

bash-4.3# apk add libgit2
ERROR: unsatisfiable constraints:
  libgit2 (missing):
    required by: world[libgit2]

Thanks for any help.

-dj

解决方案

libgit2 is not present in either of main or community repositories that come preconfigured in the standard Alpine image, so you'll have to add the testing repo first:

# echo http://dl-4.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories

Then update package caches:

# apk update

And finally install libgit2:

# apk add libgit2

这篇关于如何在Alipne linux上安装libgit2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆