Answers:
首先创建一个ddebs.list
使用:
echo "deb http://ddebs.ubuntu.com $(lsb_release -cs) main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/ddebs.list
然后添加GPG密钥ddebs.ubuntu.com
:
wget -O - http://ddebs.ubuntu.com/dbgsym-release-key.asc | sudo apt-key add -
然后运行:
sudo apt-get update
然后使用以下命令安装符号包:
sudo apt-get install linux-image-`uname -r`-dbgsym
这相当大(> 680MB),因此请等待下载。
我将Linux内核调试符号用于类似systemtap
内核的工具。
apt-get update
导致出现警告消息:W: GPG error: http://ddebs.ubuntu.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ECDCAD72428D7C01
,这就是为什么我要针对这种情况扩展解决方案。
sudo apt-get install linux-image-$(uname -r)-dbgsym=3.13.0-49.83 Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package linux-image-3.13.0-49-generic-dbgsym E: Couldn't find any package by regex 'linux-image-3.13.0-49-generic-dbgsym'
我尝试了Colin Ian King的答案,但它对我没有用。我发现我必须在其中添加两行/etc/apt/sources.list.d/ddebs.list
通过编辑文件
sudo nano /etc/apt/sources.list.d/ddebs.list
并在下面添加两行
deb http://ddebs.ubuntu.com trusty-updates main restricted universe multiverse
deb http://ddebs.ubuntu.com trusty-proposed main restricted universe multiverse
替换trusty
为执行时获得的版本
lsb_release -cs
GPG密钥导入
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C8CAB6595FDFF622
添加存储库配置
codename=$(lsb_release -c | awk '{print $2}')
sudo tee /etc/apt/sources.list.d/ddebs.list << EOF
deb http://ddebs.ubuntu.com/ ${codename} main restricted universe multiverse
deb http://ddebs.ubuntu.com/ ${codename}-security main restricted universe multiverse
deb http://ddebs.ubuntu.com/ ${codename}-updates main restricted universe multiverse
deb http://ddebs.ubuntu.com/ ${codename}-proposed main restricted universe multiverse
EOF
sudo apt-get update
sudo apt-get install linux-image-$(uname -r)-dbgsym
(贷给Ubuntu Wiki)
apt-cache search dbgsym
pkg-create-dbgsym
仅返回,是否在其他存储库中?