要获得BleachBit的最新版本(对于Ubuntu20.04),我们可以使用以下命令:
wget -c https://download.bleachbit.org/bleachbit_4.4.0-0_all_ubuntu2004.deb -O bleachbit.deb
dpkg -i bleachbit.deb如果我们从正式的Ubuntu存储库(使用apt-get bleachbit)安装它,就会安装一个旧版本,其中包含安装错误。和根据这个工具的创建者:
Ubuntu有“不滚动发行版”策略,因此Ubuntu存储库不会使用最新版本进行更新。
由于这个工具是定期更新的,我想一直下载最新版本。所以我做了这个狂欢,但没有用:
lastbleachbit=$(wget -O - https://www.bleachbit.org/download/ | grep -Po '/download/file/([^"]+)' | grep ubuntu2004 | sort -u)
wget -c https://www.bleachbit.org"$lastbleachbit" -O bleachbit.deb
dpkg -i bleachbit.deb输出变量:
lastmintstick=$(wget -O - http://packages.linuxmint.com/pool/main/m/mintstick/ | grep -Po 'href=".*?"' | sed -r 's:href\="(.*)":\1:' | grep ".deb" | sort | tail -1)
--2021-11-10 10:24:50-- http://packages.linuxmint.com/pool/main/m/mintstick/
Resolviendo packages.linuxmint.com (packages.linuxmint.com)... 208.77.20.11, 68.235.39.11
Conectando con packages.linuxmint.com (packages.linuxmint.com)[208.77.20.11]:80... conectado.
Petición HTTP enviada, esperando respuesta... 200 OK
Longitud: 10112 (9,9K) [text/html]
Guardando como: “STDOUT”
- 100%[===================>] 9,88K --.-KB/s en 0s
2021-11-10 10:24:51 (191 MB/s) - escritos a stdout [10112/10112]输出命令:
wget -c https://www.bleachbit.org"$lastbleachbit"
--2021-11-10 10:26:39-- https://www.bleachbit.org/
Resolviendo www.bleachbit.org (www.bleachbit.org)... 172.67.129.101, 104.21.1.137, 2606:4700:3030::ac43:8165, ...
Conectando con www.bleachbit.org (www.bleachbit.org)[172.67.129.101]:443... conectado.
Petición HTTP enviada, esperando respuesta... 200 OK
Longitud: no especificado [text/html]
Guardando como: “index.html”
index.html [ <=> ] 10,93K --.-KB/s en 0,002s
2021-11-10 10:26:40 (4,38 MB/s) - “index.html” guardado [11193]我做错什么了?
发布于 2021-11-10 15:36:48
你想/linux了。
$ lastbleachbit=$(wget --quiet -O - https://www.bleachbit.org/download/linux | grep -Po '/download/file/([^"]+)' | grep ubuntu2004 | sort -u)
$ echo $lastbleachbit
/download/file/t?file=bleachbit_4.4.0-0_all_ubuntu2004.deb以我有限的grep知识,我设法使它发挥作用。
$ lastbleachbit=$(wget --quiet -O - https://www.bleachbit.org/download/linux | grep -Po '(?<=file=).*(?=">)' | grep ubuntu2004 | sort -u)
$ echo $lastbleachbit
bleachbit_4.4.0-0_all_ubuntu2004.deb当你下载的时候。
$ wget "https://download.bleachbit.org/${lastbleachbit}"
--2021-11-10 16:01:10-- https://download.bleachbit.org/bleachbit_4.4.0-0_all_ubuntu2004.deb
Resolving download.bleachbit.org (download.bleachbit.org)... 172.67.129.101, 104.21.1.137, 2606:4700:3035::6815:189, ...
Connecting to download.bleachbit.org (download.bleachbit.org)|172.67.129.101|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 441432 (431K) [application/x-deb]
Saving to: ‘bleachbit_4.4.0-0_all_ubuntu2004.deb’
bleachbit_4.4.0-0_all_ubuntu2004. 100%[===========================================================>] 431.09K 2.02MB/s in 0.2s
2021-11-10 16:01:11 (2.02 MB/s) - ‘bleachbit_4.4.0-0_all_ubuntu2004.deb’ saved [441432/441432]我认为只要下载页面继续嵌入包含.deb文件的链接就可以了,不过我不知道我从没有使用过bleachbit多久。
https://askubuntu.com/questions/1374738
复制相似问题