我正在尝试升级 bash 以使其不易受到攻击。
我尝试了 Debian 的源列表生成器。但libtinfo5
它阻止我升级 bash。我找不到旧版本(由于源列表问题)以libtinfo5
查看是否可以安装它。
来源列表
deb http://deb.debian.org/debian/ stable main contrib non-free
deb http://deb.debian.org/debian/ stable-updates main contrib non-free
deb http://deb.debian.org/debian-security stable/updates main
root@server:~# apt-get install --only-upgrade bash Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libdpkg-perl bzip2 libmpfr4 fakeroot libalgorithm-merge-perl
linux-kbuild-2.6.32 linux-headers-2.6.32-5-common libcloog-isl4
libalgorithm-diff-xs-perl libgomp1 libtimedate-perl cpp libgmp3c2 dpkg-dev
wwwconfig-common gcc-4.3-base cpp-4.3 cpp-4.4 libalgorithm-diff-perl
binutils javascript-common make libmpc3 libisl10 libjs-mootools
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libtinfo5
Suggested packages:
bash-doc
The following NEW packages will be installed:
libtinfo5
The following packages will be upgraded:
bash
1 upgraded, 1 newly installed, 0 to remove and 316 not upgraded.
Need to get 1,725 kB of archives.
After this operation, 2,806 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
libtinfo5 bash
Install these packages without verification [y/N]? y
Get:1 http://deb.debian.org/debian/ stable/main libtinfo5 amd64 6.0+20161126-1 [ 299 kB]
Get:2 http://deb.debian.org/debian/ stable/main bash amd64 4.4-5 [1,427 kB]
Fetched 1,725 kB in 0s (3,319 kB/s)
Reading changelogs... Done
(Reading database ... 36165 files and directories currently installed.)
Unpacking libtinfo5 (from .../libtinfo5_6.0+20161126-1_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/libtinfo5_6.0+20161126-1_amd64.de b (--unpack):
triggers ci file contains unknown directive `activate-noawait'
configured to not write apport reports
Errors were encountered while processing:
/var/cache/apt/archives/libtinfo5_6.0+20161126-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
apt-cache 策略输出
root@server:~# apt-cache policy bash
bash:
Installed: 4.1-3
Candidate: 4.1-3
Version table:
*** 4.1-3 0
100 /var/lib/dpkg/status
答案1
评论太长:
- 做
wget http://snapshot.debian.org/archive/debian-archive/20160313T130328Z/debian/pool/main/b/bash/bash_4.1-3%2Bdeb6u2_amd64.deb
(假设amd64
是你的架构) - 下载文件后,运行
dpkg -i bash_4.1-3+deb6u2_amd64.deb
(以 root 身份/通过sudo
)
严重地:升级此系统,或使其脱机。