无法在 Ubuntu 上安装 Git 核心库

发布于 2024-10-13 06:29:41 字数 605 浏览 2 评论 0原文

根据 Scott Chacon 的 Pro Git 书籍第 9 页,要在 Ubuntu 上安装 Git,我们需要有 Git 依赖的库:curlzlibopenssl expatlibioconv。因此,我输入

$ sudo apt-get install curl-devel expat-devel gettext-devel openssl-devel zlib-devel

并收到错误消息

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package curl-devel

那么有人遇到过这个问题吗?

我使用的是 Ubuntu 10.04 LTS,我尝试安装的 Git 版本是 git-1.7.3

谢谢。

Based on the Pro Git book by Scott Chacon on page 9, to install Git on Ubuntu we need to have libraries that Git depends on: curl, zlib, openssl, expat, and libioconv. Thus, I type

$ sudo apt-get install curl-devel expat-devel gettext-devel openssl-devel zlib-devel

and I got the error message

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package curl-devel

So has anyone ever met this issue?

I'm using Ubuntu 10.04 LTS, and the Git version I'm trying to install is git-1.7.3.

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

深海蓝天 2024-10-20 06:29:41

您是否尝试过sudo apt-get install git-core?包管理器旨在为您解决依赖关系,因此您无需手动执行此操作。诚然,lucid 软件包存储库中的 Git 版本是 1.7.0,但除非您确实需要最新版本,否则使用您的版本支持的版本可能会更简单(或者在安装支持的版本)。

apt 会去这里为您找到列出的依赖项,并提示您让它自动安装它们。

Have you tried simply sudo apt-get install git-core? Package managers are designed to resolve dependencies for you, so that you don't have to do it manually. Granted, the version of Git that's in the lucid package repository is 1.7.0, but unless you really need the very latest version, it may be much simpler to just go with the one supported for your release (or update Git later after installing the supported version).

apt would go and find the dependencies listed here for you, and prompt you to have it automatically install them as well.

羁拥 2024-10-20 06:29:41

您可能需要 libcurl-dev,但如果您只需要 版本的 git,git-core 应该没问题。

如果您想构建 git 源 tarball apt-get build-dep git-core 应该安装您需要的所有开发包。

You probably want libcurl-dev, though if you just need a version of git, git-core should be fine.

If you want to build a git source tarball apt-get build-dep git-core should install all the development packages you need.

枫以 2024-10-20 06:29:41

您可以直接在 ubuntu 上安装 git,只需:

apt-get install git-core

这将为您处理所有依赖项。

如果你确实想从源代码构建它,请运行:

apt-get build-deps git-core

这将为你检索构建 git 所需的所有依赖项(至少是 ubuntu 中可用的 git 版本)。

You can install git directly on ubuntu with simply:

apt-get install git-core

This will take care of all dependencies for you.

If you really want to build it from source, run:

apt-get build-deps git-core

This will retrieve all dependencies needed to build git (at least, the version of git available in ubuntu) for you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文