查看机器系统的内核版本:
root@DMIT-9MevWGVmMF:~# uname -rsa
Linux DMIT-9MevWGVmMF 5.19.11-bbrplus #1 SMP PREEMPT_DYNAMIC Sat Sep 24 02:40:44 CST 2022 x86_64 x86_64 x86_64 GNU/Linux
人们尝试执行以下命令:
sudo apt-get install iperf3
出现以下严重问题致无法在线安装软件包。
root@DMIT-9MevWGVmMF:~# sudo apt-get install iperf3
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package linux-headers-4.11.8-041108 needs to be reinstalled, but I can't find an archive for it.
解决方案(步骤):
cd ~
mkdir ko
cd ko
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11.8/linux-headers-4.11.8-041108_4.11.8-041108.201706290836_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11.8/linux-headers-4.11.8-041108-generic_4.11.8-041108.201706290836_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11.8/linux-image-4.11.8-041108-generic_4.11.8-041108.201706290836_amd64.deb
sudo dpkg -i *.deb
尝试安装 iperf3:
sudo apt-get install iperf3 -y
出现以下提示:
root@DMIT-9MevWGVmMF:~/ko# sudo apt-get install iperf3 -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
iperf3 is already the newest version (3.1.3-1).
The following packages were automatically installed and are no longer required:
linux-headers-4.18.0-15 linux-headers-4.18.0-15-generic linux-headers-4.18.0-16 linux-headers-4.18.0-16-generic linux-modules-4.18.0-15-generic linux-modules-4.18.0-16-generic
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 30 not upgraded.
解决方案:
root@DMIT-9MevWGVmMF:~/ko# sudo apt-get install linux-headers-4.18.0-15 linux-headers-4.18.0-15-generic linux-headers-4.18.0-16 linux-headers-4.18.0-16-generic linux-modules-4.18.0-15-generic linux-modules-4.18.0-16-generic -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-headers-4.18.0-16-generic is already the newest version (4.18.0-16.17).
linux-headers-4.18.0-16-generic set to manually installed.
linux-headers-4.18.0-15-generic is already the newest version (4.18.0-15.16).
linux-headers-4.18.0-15-generic set to manually installed.
linux-headers-4.18.0-15 is already the newest version (4.18.0-15.16).
linux-headers-4.18.0-15 set to manually installed.
linux-modules-4.18.0-16-generic is already the newest version (4.18.0-16.17).
linux-modules-4.18.0-16-generic set to manually installed.
linux-headers-4.18.0-16 is already the newest version (4.18.0-16.17).
linux-headers-4.18.0-16 set to manually installed.
linux-modules-4.18.0-15-generic is already the newest version (4.18.0-15.16).
linux-modules-4.18.0-15-generic set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 30 not upgraded.
DMIT机器上安装 linux-perf 性能监控及调试程式:
apt-get install libelf1=0.170-0.4ubuntu0.1 libdw1
apt-get install linux-tools-4.15.0-194 -y
apt-get install linux-cloud-tools-4.15.0-194 linux-cloud-tools-4.15.0-194-generic linux-cloud-tools-common
设置apt软件源:
nano /etc/apt/sources.list
deb http://security.ubuntu.com/ubuntu bionic-security main
重新安装依赖环境:
apt-get update -y
apt-get -f install -y
apt-get install linux-tools-generic -y
apt-get install linux-tools-common linux-tools-generic linux-cloud-tools-generic -y
apt-get install linux-tools-* linux-cloud-tools-* -y