Closed englianhu closed 2 years ago
$ git version
git version 2.20.1
$ git-lfs -v
git-lfs/2.7.1 (GitHub; linux amd64; go 1.11.6)
$ go version
go version go1.11.6 linux/amd64
官网下载最新版本git
,请查阅Download for Linux and Unix
$ wget https://www.kernel.org/pub/software/scm/git/git-2.37.3.tar.gz
$ sudo tar -C /usr/lib -xzf git-2.37.3.tar.gz
$ sudo rm -rf git-2.37.3.tar.gz
$ sudo mv /usr/lib/git-2.37.3/ /usr/lib/git
$ sudo chmod 777 -R /usr/lib/git
$ cd /usr/lib/git/
$ sudo ./configure
$ sudo make
$ sudo make install
SUBDIR git-gui
SUBDIR gitk-git
SUBDIR templates
install -d -m 755 '/usr/local/bin'
install -d -m 755 '/usr/local/libexec/git-core'
install: 无法创建目录 “/usr/local/libexec”: 权限不够
make: *** [Makefile:3190:install] 错误 1
:/usr/lib/git$ sudo make install
SUBDIR git-gui
SUBDIR gitk-git
SUBDIR templates
install -d -m 755 '/usr/local/bin'
install -d -m 755 '/usr/local/libexec/git-core'
install git-daemon git-http-backend git-imap-send git-sh-i18n--envsubst git-shell git-http-fetch git-http-push git-remote-http git-remote-https git-remote-ftp git-remote-ftps '/usr/local/libexec/git-core'
install git-bisect git-difftool--helper git-filter-branch git-merge-octopus git-merge-one-file git-merge-resolve git-mergetool git-quiltimport git-request-pull git-submodule git-web--browse git-add--interactive git-archimport git-cvsexportcommit git-cvsimport git-cvsserver git-send-email git-svn git-p4 git-instaweb '/usr/local/libexec/git-core'
install -m 644 git-mergetool--lib git-sh-i18n git-sh-setup '/usr/local/libexec/git-core'
install git git-receive-pack git-shell git-upload-archive git-upload-pack '/usr/local/bin'
install git-cvsserver '/usr/local/bin'
make -C templates DESTDIR='' install
make[1]: 进入目录“/usr/lib/git/templates”
install -d -m 755 '/usr/local/share/git-core/templates'
(cd blt && tar cf - .) | \
(cd '/usr/local/share/git-core/templates' && umask 022 && tar xof -)
make[1]: 离开目录“/usr/lib/git/templates”
install -d -m 755 '/usr/local/libexec/git-core/mergetools'
install -m 644 mergetools/* '/usr/local/libexec/git-core/mergetools'
install -d -m 755 '/usr/local/share/locale'
(cd po/build/locale && tar cf - .) | \
(cd '/usr/local/share/locale' && umask 022 && tar xof -)
install -d -m 755 '/usr/local/share/perl5'
(cd perl/build/lib && tar cf - .) | \
(cd '/usr/local/share/perl5' && umask 022 && tar xof -)
make -C gitweb install
make[1]: 进入目录“/usr/lib/git/gitweb”
make[2]: 进入目录“/usr/lib/git”
make[2]: “GIT-VERSION-FILE”已是最新。
make[2]: 离开目录“/usr/lib/git”
GEN gitweb.cgi
GEN static/gitweb.js
install -d -m 755 '/usr/local/share/gitweb'
install -m 755 gitweb.cgi '/usr/local/share/gitweb'
install -d -m 755 '/usr/local/share/gitweb/static'
install -m 644 static/gitweb.js static/gitweb.css static/git-logo.png static/git-favicon.png '/usr/local/share/gitweb/static'
make[1]: 离开目录“/usr/lib/git/gitweb”
make -C gitk-git install
make[1]: 进入目录“/usr/lib/git/gitk-git”
install -d -m 755 '/usr/local/bin'
install -m 755 gitk-wish '/usr/local/bin'/gitk
install -d -m 755 '/usr/local/share/gitk/lib/msgs'
install -m 644 po/zh_cn.msg '/usr/local/share/gitk/lib/msgs' && install -m 644 po/de.msg '/usr/local/share/gitk/lib/msgs' && install -m 644 po/ja.msg '/usr/local/share/gitk/lib/msgs' && install -m 644 po/sv.msg '/usr/local/share/gitk/lib/msgs' && install -m 644 po/it.msg '/usr/local/share/gitk/lib/msgs' && install -m 644 po/pt_pt.msg '/usr/local/share/gitk/lib/msgs' && install -m 644 po/pt_br.msg '/usr/local/share/gitk/lib/msgs' && install -m 644 po/ru.msg '/usr/local/share/gitk/lib/msgs' && install -m 644 po/ca.msg '/usr/local/share/gitk/lib/msgs' && install -m 644 po/vi.msg '/usr/local/share/gitk/lib/msgs' && install -m 644 po/hu.msg '/usr/local/share/gitk/lib/msgs' && install -m 644 po/bg.msg '/usr/local/share/gitk/lib/msgs' && install -m 644 po/es.msg '/usr/local/share/gitk/lib/msgs' && install -m 644 po/fr.msg '/usr/local/share/gitk/lib/msgs' && true
make[1]: 离开目录“/usr/lib/git/gitk-git”
make -C git-gui gitexecdir='/usr/local/libexec/git-core' install
make[1]: 进入目录“/usr/lib/git/git-gui”
DEST /usr/local/libexec/git-core
INSTALL 755 git-gui
INSTALL 755 git-gui--askpass
LINK git-citool -> git-gui
DEST /usr/local/share/git-gui/lib
INSTALL 644 tclIndex
INSTALL 644 themed.tcl
INSTALL 644 tools.tcl
INSTALL 644 branch_create.tcl
INSTALL 644 line.tcl
INSTALL 644 console.tcl
INSTALL 644 checkout_op.tcl
INSTALL 644 remote_add.tcl
INSTALL 644 browser.tcl
INSTALL 644 merge.tcl
INSTALL 644 branch_checkout.tcl
INSTALL 644 status_bar.tcl
INSTALL 644 chord.tcl
INSTALL 644 diff.tcl
INSTALL 644 remote.tcl
INSTALL 644 choose_font.tcl
INSTALL 644 option.tcl
INSTALL 644 encoding.tcl
INSTALL 644 mergetool.tcl
INSTALL 644 spellcheck.tcl
INSTALL 644 tools_dlg.tcl
INSTALL 644 search.tcl
INSTALL 644 shortcut.tcl
INSTALL 644 branch_rename.tcl
INSTALL 644 class.tcl
INSTALL 644 remote_branch_delete.tcl
INSTALL 644 choose_repository.tcl
INSTALL 644 about.tcl
INSTALL 644 transport.tcl
INSTALL 644 win32.tcl
INSTALL 644 choose_rev.tcl
INSTALL 644 branch.tcl
INSTALL 644 commit.tcl
INSTALL 644 branch_delete.tcl
INSTALL 644 blame.tcl
INSTALL 644 index.tcl
INSTALL 644 logo.tcl
INSTALL 644 date.tcl
INSTALL 644 database.tcl
INSTALL 644 sshkey.tcl
INSTALL 644 error.tcl
INSTALL 644 git-gui.ico
INSTALL 644 win32_shortcut.js
DEST /usr/local/share/git-gui/lib/msgs
INSTALL 644 pt_br.msg
INSTALL 644 zh_cn.msg
INSTALL 644 de.msg
INSTALL 644 ja.msg
INSTALL 644 it.msg
INSTALL 644 pt_pt.msg
INSTALL 644 fr.msg
INSTALL 644 ru.msg
INSTALL 644 el.msg
INSTALL 644 hu.msg
INSTALL 644 bg.msg
INSTALL 644 nb.msg
INSTALL 644 sv.msg
INSTALL 644 vi.msg
make[1]: 离开目录“/usr/lib/git/git-gui”
bindir=$(cd '/usr/local/bin' && pwd) && \
execdir=$(cd '/usr/local/libexec/git-core' && pwd) && \
destdir_from_execdir_SQ=$(echo 'libexec/git-core' | sed -e 's|[^/][^/]*|..|g') && \
{ test "$bindir/" = "$execdir/" || \
for p in git git-shell git-cvsserver; do \
rm -f "$execdir/$p" && \
test -n "" && \
ln -s "$destdir_from_execdir_SQ/bin/$p" "$execdir/$p" || \
{ test -z "" && \
ln "$bindir/$p" "$execdir/$p" 2>/dev/null || \
cp "$bindir/$p" "$execdir/$p" || exit; } \
done; \
} && \
for p in git-receive-pack git-upload-archive git-upload-pack; do \
rm -f "$bindir/$p" && \
test -n "" && \
ln -s "git" "$bindir/$p" || \
{ test -z "" && \
ln "$bindir/git" "$bindir/$p" 2>/dev/null || \
ln -s "git" "$bindir/$p" 2>/dev/null || \
cp "$bindir/git" "$bindir/$p" || exit; }; \
done && \
for p in git-add git-am git-annotate git-apply git-archive git-bisect--helper git-blame git-branch git-bugreport git-bundle git-cat-file git-check-attr git-check-ignore git-check-mailmap git-check-ref-format git-checkout--worker git-checkout-index git-checkout git-clean git-clone git-column git-commit-graph git-commit-tree git-commit git-config git-count-objects git-credential-cache--daemon git-credential-cache git-credential-store git-credential git-describe git-diff-files git-diff-index git-diff-tree git-diff git-difftool git-env--helper git-fast-export git-fast-import git-fetch-pack git-fetch git-fmt-merge-msg git-for-each-ref git-for-each-repo git-fsck git-fsmonitor--daemon git-gc git-get-tar-commit-id git-grep git-hash-object git-help git-hook git-index-pack git-init-db git-interpret-trailers git-log git-ls-files git-ls-remote git-ls-tree git-mailinfo git-mailsplit git-merge-base git-merge-file git-merge-index git-merge-ours git-merge-recursive git-merge-tree git-merge git-mktag git-mktree git-multi-pack-index git-mv git-name-rev git-notes git-pack-objects git-pack-redundant git-pack-refs git-patch-id git-prune-packed git-prune git-pull git-push git-range-diff git-read-tree git-rebase git-receive-pack git-reflog git-remote-ext git-remote-fd git-remote git-repack git-replace git-rerere git-reset git-rev-list git-rev-parse git-revert git-rm git-send-pack git-shortlog git-show-branch git-show-index git-show-ref git-sparse-checkout git-stash git-stripspace git-submodule--helper git-symbolic-ref git-tag git-unpack-file git-unpack-objects git-update-index git-update-ref git-update-server-info git-upload-archive git-upload-pack git-var git-verify-commit git-verify-pack git-verify-tag git-worktree git-write-tree git-cherry git-cherry-pick git-format-patch git-fsck-objects git-init git-maintenance git-merge-subtree git-restore git-show git-stage git-status git-switch git-whatchanged; do \
rm -f "$execdir/$p" && \
if test -z ""; \
then \
test -n "" && \
ln -s "$destdir_from_execdir_SQ/bin/git" "$execdir/$p" || \
{ test -z "" && \
ln "$execdir/git" "$execdir/$p" 2>/dev/null || \
ln -s "git" "$execdir/$p" 2>/dev/null || \
cp "$execdir/git" "$execdir/$p" || exit; }; \
fi \
done && \
remote_curl_aliases="git-remote-https git-remote-ftp git-remote-ftps" && \
for p in $remote_curl_aliases; do \
rm -f "$execdir/$p" && \
test -n "" && \
ln -s "git-remote-http" "$execdir/$p" || \
{ test -z "" && \
ln "$execdir/git-remote-http" "$execdir/$p" 2>/dev/null || \
ln -s "git-remote-http" "$execdir/$p" 2>/dev/null || \
cp "$execdir/git-remote-http" "$execdir/$p" || exit; } \
done
$ sudo apt update
$ git version
git version 2.37.3
倘若git version
查询版本还是没有显示最新版本,需要再开个终端输入git version
查阅。
$ wget https://packagecloud.io/github/git-lfs/packages/debian/bullseye/git-lfs_3.2.0_amd64.deb/download
--2022-09-22 18:43:43-- https://packagecloud.io/github/git-lfs/packages/debian/bullseye/git-lfs_3.2.0_amd64.deb/download
正在解析主机 packagecloud.io (packagecloud.io)... 失败:域名解析暂时失败。
wget: 无法解析主机地址 “packagecloud.io”
englianhu@Scibrokes:~$ wget https://packagecloud.io/github/git-lfs/packages/debian/bullseye/git-lfs_3.2.0_amd64.deb
--2022-09-22 18:45:52-- https://packagecloud.io/github/git-lfs/packages/debian/bullseye/git-lfs_3.2.0_amd64.deb
正在解析主机 packagecloud.io (packagecloud.io)... 54.183.164.179, 52.9.170.32
正在连接 packagecloud.io (packagecloud.io)|54.183.164.179|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:未指定 [text/html]
正在保存至: “git-lfs_3.2.0_amd64.deb”
git-lfs_3.2.0_amd64.d [ <=> ] 20.47K 113KB/s 用时 0.2s
2022-09-22 18:46:33 (113 KB/s) - “git-lfs_3.2.0_amd64.deb” 已保存 [20961]
$ sudo gdebi git-lfs_3.2.0_amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
打开软件包失败
软件包可能已被破坏,或者不允许您打开此文件。检查文件的权限。
## 手动下载后
$ # sudo gdebi git-lfs_3.2.0_amd64.deb
$ # sudo rm -rf git-lfs_3.2.0_amd64.deb
$ sudo apt install -y ./*.deb && sudo rm -rf *.deb
$ git-lfs -v
git-lfs/3.2.0 (GitHub; linux amd64; go 1.18.2)
wget https://github.com/git-lfs/git-lfs/releases/download/v3.2.0/git-lfs-linux-amd64-v3.2.0.tar.gz
sudo tar -C /usr/lib -xzf git-lfs-3.2.0
sudo rm -rf git-2.37.3.tar.gz
sudo mv /usr/lib/git-lfs-3.2.0/ /usr/lib/git-lfs
sudo chmod 777 -R /usr/lib/git-lfs
cd /usr/lib/git-lfs/
sudo ./configure
sudo make
sudo make install
以下官网可下载最新版本git-lfs
:
$ git-lfs -v
git-lfs/3.2.0 (GitHub; linux amd64; go 1.18.2)
以上go语言尚未更新至最新版本,可参考以下链接更新~
$ go version
go version go1.19.1 linux/amd64
wget https://github.com/shiftkey/desktop/releases/download/release-3.0.6-linux1/GitHubDesktop-linux-3.0.6-linux1.deb
sudo apt install -y ./*.deb && sudo rm -rf *.deb
Above error shows unable add repository ppa on Redflag V11 (Debian 11), somebody take a look?
🚩🇨🇳🏹红旗中科 RedFlag Linux (🍥Debian 11)
Here I tried to re-add upon install
git-lfs
andgit track '*.rds'
but show below error whengit add .
.Originally posted by @englianhu in https://github.com/englianhu/binary.com-interview-question-data/issues/2#issuecomment-1254797177
Originally posted by @englianhu in https://github.com/git-lfs/git-lfs/issues/3519#issuecomment-1254823435