惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Vercel News
Vercel News
Recorded Future
Recorded Future
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The GitHub Blog
The GitHub Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Google DeepMind News
Google DeepMind News
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Microsoft Azure Blog
Microsoft Azure Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
M
MIT News - Artificial intelligence
云风的 BLOG
云风的 BLOG
Y
Y Combinator Blog
N
News | PayPal Newsroom
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Help Net Security
Help Net Security
博客园 - Franky
SecWiki News
SecWiki News
Recent Announcements
Recent Announcements
T
Troy Hunt's Blog
The Register - Security
The Register - Security
The Last Watchdog
The Last Watchdog
Webroot Blog
Webroot Blog
S
Security Affairs
博客园 - 司徒正美
S
Schneier on Security
I
InfoQ
博客园_首页
www.infosecurity-magazine.com
www.infosecurity-magazine.com
T
Threat Research - Cisco Blogs
Forbes - Security
Forbes - Security
腾讯CDC
N
Netflix TechBlog - Medium
N
News and Events Feed by Topic
Cloudbric
Cloudbric
T
The Exploit Database - CXSecurity.com
P
Proofpoint News Feed
A
About on SuperTechFans
Engineering at Meta
Engineering at Meta
Recent Commits to openclaw:main
Recent Commits to openclaw:main
B
Blog
V
Vulnerabilities – Threatpost
C
Check Point Blog
Google DeepMind News
Google DeepMind News
Google Online Security Blog
Google Online Security Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Hacker News - Newest:
Hacker News - Newest: "LLM"
C
Cisco Blogs
Schneier on Security
Schneier on Security
O
OpenAI News
K
Kaspersky official blog

mephisto.cc

修复rime-ice无法弹出候选框的问题 开机滚动字体显示优化 个人网站安全防护 树莓派上部署Vaultwarden 使用goaccess实时分析Caddy日志 个人网站监控 Hugo全站AVIF记 Linux下尝试使用Godot开发小游戏 Arch linux dae 透明代理 Airflow接管galler-dl下载任务 如何使用gallery-dl批量下载图像 Arch核显下如何愉快玩Dota2和CS2 Arch/labwc 环境网络相关设置 Rime添加dota2词库 Arch 重装记录 Supertuxkart iOS版终于发布了 打造自己的流媒体音乐服务 剪切板管理工具clipcat推荐 MangoHud性能监控 微信小程序开发记 Rofi试用 解决Arch下VSCode无法输入中文的问题 独立窗口管理器下无法录屏问题处理 上海市二手房成交数据监控 OpenLDAP监控 Arch linux如何顺畅连接蓝牙设备 使用Git和Ansible管理配置文件 Arch Linux SSL VPN 客户端配置 简单获取celery任务实时结果 Arch linux下iNode客户端的安装和使用方法 券商费率调整记 迷你主机组装记 Labwc更换定制皮肤 树莓派跑分流代理 实用自动代理配置示例 九年老鼠标复活记 Openvpn示例 Mac下如何旋转webp图片 如何隐藏Vscode中Markdown PDF插件的头部内容 解决Linux下网络配置无法变更保存的问题 labwc环境启用wlogout Ubuntu下新官方微信尝鲜 简单检测用户是否开启广告屏蔽 Atuin ZFS下卡顿问题解决 Wine安装64位微信 Fish 和 Atuin使用记 Fastapi简单实现临时下载链接 Fastapi微信公众号开发简要 Hugo根据语种展示不同内容 如何修复Waybar微信图标错误 信封加密简要 Linux环境下维护公众号记录 快速隐藏和呼出终端 Wayland环境自动切换壁纸 SuperTuxKart 试玩 简单抓取雪球股票快讯 为什么你的kill命令不能列出信号表 Wine安装微信保姆教程 Hysteria科学上网简要 Ubuntu 23.10 钉钉无法启动解决方法 网站导航栏防止插入Adsense自动广告 Linux环境按键检测 Hugo文末添加最后修改时间 Wayland环境ksnip无法复制问题解决 我眼中的股票市场 Caddy简单图片防盗链 greetd和regreet使用教程 Wayland环境下截图加后期修改 Wayland 环境下gif录屏 Firefox的一些有趣功能 Ubuntu 切换系统语言 Firefox 标题栏高度调整 网站添加回到顶部功能 Hugo自定义字体 Labwc 便捷配置 Wofi使用教程 窗口管理器labwc使用记 文件共享软件Dufs推荐 Hugo静态站点接入Adsense广告 Fcitx5配置详解 Ubuntu安装chrome的方法总结 一种Xterm.js的全屏方案 Google网址收录api Python示例 手机听离线音乐 Snipe it资产导入 应用启动器yofi使用配置 Snipe it资产管理系统安装使用 Ubuntu开机启动加速 Vue3 vite TypeScript跨域等相关设置 Ubuntu手动升级Libreoffice Ubuntu设置alacritty为默认终端 简体文章批量转换为繁体 使用Inkscape调整svg图片大小 实用命令 使用mitmproxy给手机app抓包 Python中rstrip方法细解 Github同主机多仓库部署deploy key问题处理 Linux安装最新版本Python KeePassXC使用教程 Ubuntu 22.10连接蓝牙耳机报错br-connection-profile-unavailable解决方法
Ubuntu源码安装最新版本git
2022-06-30 · via mephisto.cc

Git 是个低频更新但很重要的开发软件,系统官方仓库的版本总是落后最新版不少,不想安装额外的日更源的话,手动源码安装最新版本是不错的解决方法。

1. 安装依赖包(install libraries that Git depends)

1    sudo apt-get install dh-autoreconf libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev install-info

2. 下载 git 源码包 (grab the latest source package)

源码包在kernel.org,懂的都懂,Linus 创造,必须放在高大上的地方, 地址为: https://www.kernel.org/pub/software/scm/git 按时间找到最新版本,写这个文章的时候最新版本包为:git-2.37.0.tar.xz

3. 解压到指定位置,我一般喜欢把非系统的源码包放在/opt (uncompress the files)

1    ➜  sudo tar -xvf git-2.37.0.tar.xz -C /opt/
2    git-2.37.0/
3    git-2.37.0/.cirrus.yml
4    git-2.37.0/.clang-format
5    git-2.37.0/.editorconfig
6    git-2.37.0/.gitattributes
7    ....

4. 编译安装 (configuire && make install)

看看默认编译参数(check default location)

 1    ➜  git-2.37.0 ./configure --help
 2    `configure' configures git 2.37.0 to adapt to many kinds of systems.
 3
 4    Usage: ./configure [OPTION]... [VAR=VALUE]...
 5
 6    To assign environment variables (e.g., CC, CFLAGS...), specify them as
 7    VAR=VALUE.  See below for descriptions of some of the useful variables.
 8
 9    Defaults for the options are specified in brackets.
10
11    Configuration:
12      -h, --help              display this help and exit
13          --help=short        display options specific to this package
14          --help=recursive    display the short help of all the included packages
15      -V, --version           display version information and exit
16      -q, --quiet, --silent   do not print `checking ...' messages
17          --cache-file=FILE   cache test results in FILE [disabled]
18      -C, --config-cache      alias for `--cache-file=config.cache'
19      -n, --no-create         do not create output files
20          --srcdir=DIR        find the sources in DIR [configure dir or `..']
21
22    Installation directories:
23      --prefix=PREFIX         install architecture-independent files in PREFIX
24                              [/usr/local]
25      --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
26                              [PREFIX]
27
28    By default, `make install' will install all the files in
29    `/usr/local/bin', `/usr/local/lib' etc.  You can specify
30    an installation prefix other than `/usr/local' using `--prefix',
31    for instance `--prefix=$HOME'.
32
33    For better control, use the options below.

符合规范,没有有必要特殊设置,开始编译

1      ➜  git-2.37.0 sudo ./configure
2    configure: Setting lib to 'lib' (the default)
3    configure: Will try -pthread then -lpthread to enable POSIX Threads.
4    configure: CHECKS for site configuration
5    checking for gcc... gcc
6    checking whether the C compiler works... yes

安装

1    ➜  git-2.37.0 sudo make install
2    GIT_VERSION = 2.37.0
3        * new build flags
4        CC fuzz-commit-graph.o
5        CC fuzz-pack-headers.o
6        ......

检查结果,新安装的版本:

1    ➜  git-2.37.0 /usr/local/bin/git --version
2    git version 2.37.0

原来系统的版本为:

1    ➜  git --version
2    git version 2.34.1

把老的版本备份为 git_old,留条退路是个好习惯。并确认环境变量 PATH 的搜索路径中有/usr/local/bin

1    ➜  sudo mv /usr/bin/git /usr/bin/git_old
2echo $PATH
3    /home/mephisto/.cargo/bin:/home/mephisto/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

大功告成

1    ➜  git -v
2    git version 2.37.0