This repository was archived by the owner on Oct 11, 2024. It is now read-only.
请问如何在非tmoe容器的debian中安装tmoe tools? #223
Answered
by
2moe
Sunrongguo2008
asked this question in
Q&A
Replies: 1 comment
# 更新 apt 索引
sudo apt update
# 安装依赖
sudo apt install curl whiptail
# match_dpkg_ver(pkg: string, ver: regex_str) -> bool
match_dpkg_ver() {
LANG=C dpkg-query -W $1 2>/dev/null | awk -v ver=$2 '{ b = match($2, ver)} END{ print (b)?"true":"false"}' 2>/dev/null
}
# 判断 libpopt0 版本是否为 1.19
is_libpopt_1_19=$(match_dpkg_ver libpopt0 '^1\.19[+\-.~]')
# 判断 libnewt 是否为 0.52.21
is_libnewt_0_52_21=$(match_dpkg_ver libnewt0.52 '^0\.52\.21[+\-.~]')
# 如果二者皆为 true 的话,说明需要修复
$is_libpopt_1_19 && $is_libnewt_0_52_21 && {
_file="wrapper.tar.gz"
curl -Lo $_file "https://packages.tmoe.me/patch/debian/w/whiptail/whiptail-wrapper_0.52.21_$(dpkg --print-architecture).tar.gz"
sudo tar -zxvf $_file -C /
sudo /usr/local/sbin/whiptail-wrapper --init
unlink $_file
}
# 下载 2.awk
curl -LO l.tmoe.me/2.awk
# 运行 2.awk
awk -f 2.awk是不是觉得很麻烦? 如果相关库已经修复的话,那就不需要那么麻烦。 |
0 replies
Answer selected by
Sunrongguo2008
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
我想在VMware中的debian中安装tmoe tools,我该怎么做?
All reactions