git is currently not installed.

本文详细介绍如何在Ubuntu系统上通过添加Git Core PPA仓库来安装最新版本的Git,并提供了检查已安装Git版本的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Git Installation on Ubuntu

Git Core PPA repository is maintain by team on launchpad. Execute following commands one by one in a sequence to add ppa in our system and install Latest git version.

$ sudo add-apt-repository ppa:git-core/ppa
$ sudo apt-get update
$ sudo apt-get install git

Check Git Version

To check the current version installed of Git use following command.

$ git --version

git version 2.21.0
root@yolubt:~/kvm-offline/kvm-deps# dpkg -i *.deb Selecting previously unselected package gir1.2-libosinfo-1.0:amd64. (Reading database ... 74593 files and directories currently installed.) Preparing to unpack gir1.2-libosinfo-1.0_1.8.0-1_amd64.deb ... Unpacking gir1.2-libosinfo-1.0:amd64 (1.8.0-1) ... Selecting previously unselected package ipxe-qemu. Preparing to unpack ipxe-qemu_1.21.1+git-20220113.fbbdc3926-0ubuntu1_all.deb ... Unpacking ipxe-qemu (1.21.1+git-20220113.fbbdc3926-0ubuntu1) ... Selecting previously unselected package libapt-pkg-perl. Preparing to unpack libapt-pkg-perl_0.1.40build2_amd64.deb ... Unpacking libapt-pkg-perl (0.1.40build2) ... Selecting previously unselected package libfdt1:amd64. Preparing to unpack libfdt1_1.6.1-1_amd64.deb ... Unpacking libfdt1:amd64 (1.6.1-1) ... Selecting previously unselected package libpixman-1-0:amd64. Preparing to unpack libpixman-1-0_0.40.0-1ubuntu0.22.04.1_amd64.deb ... Unpacking libpixman-1-0:amd64 (0.40.0-1ubuntu0.22.04.1) ... Selecting previously unselected package liburing2:amd64. Preparing to unpack liburing2_2.1-2build1_amd64.deb ... Unpacking liburing2:amd64 (2.1-2build1) ... Selecting previously unselected package libvirt0:amd64. Preparing to unpack libvirt0_8.0.0-1ubuntu7.11_amd64.deb ... Unpacking libvirt0:amd64 (8.0.0-1ubuntu7.11) ... Selecting previously unselected package msr-tools. Preparing to unpack msr-tools_1.3-4_amd64.deb ... Unpacking msr-tools (1.3-4) ... Selecting previously unselected package python3-libvirt. Preparing to unpack python3-libvirt_8.0.0-1build1_amd64.deb ... Unpacking python3-libvirt (8.0.0-1build1) ... Selecting previously unselected package python3-libxml2:amd64. Preparing to unpack python3-libxml2_2.9.13+dfsg-1ubuntu0.7_amd64.deb ... Unpacking python3-libxml2:amd64 (2.9.13+dfsg-1ubuntu0.7) ... Selecting previously unselected package qemu-system-common. Preparing to unpack qemu-system-common_1%3a6.2+dfsg-2ubuntu6.26_amd64.deb ... Unpacking qemu-system-common (1:6.2+dfsg-2ubuntu6.26) ... Selecting previously unselected package seabios. Preparing to unpack seabios_1.15.0-1_all.deb ... Unpacking seabios (1.15.0-1) ... Selecting previously unselected package xorriso. Preparing to unpack xorriso_1.5.4-2_amd64.deb ... Unpacking xorriso (1.5.4-2) ... dpkg: dependency problems prevent configuration of gir1.2-libosinfo-1.0:amd64: gir1.2-libosinfo-1.0:amd64 depends on gir1.2-freedesktop; however: Package gir1.2-freedesktop is not installed. gir1.2-libosinfo-1.0:amd64 depends on libosinfo-1.0-0 (>= 1.8.0~); however: Package libosinfo-1.0-0 is not installed. dpkg: error processing package gir1.2-libosinfo-1.0:amd64 (--install): dependency problems - leaving unconfigured Setting up ipxe-qemu (1.21.1+git-20220113.fbbdc3926-0ubuntu1) ... Setting up libapt-pkg-perl (0.1.40build2) ... Setting up libfdt1:amd64 (1.6.1-1) ... Setting up libpixman-1-0:amd64 (0.40.0-1ubuntu0.22.04.1) ... Setting up liburing2:amd64 (2.1-2build1) ... dpkg: dependency problems prevent configuration of libvirt0:amd64: libvirt0:amd64 depends on libyajl2 (>= 2.0.4); however: Package libyajl2 is not installed. dpkg: error processing package libvirt0:amd64 (--install): dependency problems - leaving unconfigured Setting up msr-tools (1.3-4) ... dpkg: dependency problems prevent configuration of python3-libvirt: python3-libvirt depends on libvirt0 (>= 8.0.0); however: Package libvirt0:amd64 is not configured yet. dpkg: error processing package python3-libvirt (--install): dependency problems - leaving unconfigured Setting up python3-libxml2:amd64 (2.9.13+dfsg-1ubuntu0.7) ... dpkg: dependency problems prevent configuration of qemu-system-common: qemu-system-common depends on libasound2 (>= 1.0.16); however: Package libasound2 is not installed. qemu-system-common depends on libbrlapi0.8 (>= 6.4); however: Package libbrlapi0.8 is not installed. qemu-system-common depends on libcacard0 (>= 2.2); however: Package libcacard0 is not installed. qemu-system-common depends on libepoxy0 (>= 1.3); however: Package libepoxy0 is not installed. qemu-system-common depends on libgbm1 (>= 7.11~1); however: Package libgbm1 is not installed. qemu-system-common depends on libspice-server1 (>= 0.14.2); however: Package libspice-server1 is not installed. qemu-system-common depends on libusbredirparser1 (>= 0.8.0); however: Package libusbredirparser1 is not installed. qemu-system-common depends on acl; however: Package acl is not installed. dpkg: error processing package qemu-system-common (--install): dependency problems - leaving unconfigured Setting up seabios (1.15.0-1) ... dpkg: dependency problems prevent configuration of xorriso: xorriso depends on libisoburn1 (= 1.5.4-2); however: Package libisoburn1 is not installed. xorriso depends on libburn4 (>= 1.4.8); however: Package libburn4 is not installed. xorriso depends on libisofs6 (>= 1.4.8); however: Package libisofs6 is not installed. dpkg: error processing package xorriso (--install): dependency problems - leaving unconfigured Processing triggers for man-db (2.10.2-1) ... Processing triggers for libc-bin (2.35-0ubuntu3.1) ... Processing triggers for install-info (6.8-4build1) ... Errors were encountered while processing: gir1.2-libosinfo-1.0:amd64 libvirt0:amd64 python3-libvirt qemu-system-common xorriso root@yolubt:~/kvm-offline/kvm-deps#
07-15
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值