(Reproduced) Ubuntu install dbgsym (debug-info)

This article is reproduced from: http://www.oolap.com/2015-11-07-ubuntu-install-dbgsym

When executing the systemtap script under linux, you need to install the debug-info of the system kernel, debug-info is called redhat, and called debug symbols under ubuntu, abbreviated as dbgsym. When ubuntu is installed by default, dbgsym is not installed, and there is no dbgsym package in the default warehouse. The dbgsym package exists in a separate warehouse. The official warehouse address is http://ddebs.ubuntu.com/, and the package name suffix seems to have also changed from .deb to .ddeb.

The steps to install dbgsym are as follows:

1. Edit /etc/apt/sources.list file to add dbgsym source

To install the dbgsym package, you can manually add this source. Edit the /etc/apt/sources.list file and add the following two lines at the end:

deb http://ddebs.ubuntu.com/ precise main
deb http://ddebs.ubuntu.com/ precise-updates main

Where precise is replaced with the name of the ubuntu release, you can use the following command to complete the operation

python2 -c 'import sys; print "\n".join(sys.argv[1:])'"deb http://ddebs.ubuntu.com/ $(lsb_release --short --codename)"{,-updates}" main #restricted universe multiverse"| sudo tee -a /etc/apt/sources.list

If you want to install dbgsym of other software, you may need to enable other components other than "main".

2. Add source public key key

When you execute sudo apt-get update after adding the source for the first time, you may see the following error message at the end:

Reading package list...carry out
W:GPG error: http://ddebs.ubuntu.com precise Release:Since there is no public key, the following signatures cannot be verified: NO_PUBKEY ECDCAD72428D7C01
W:GPG error: http://ddebs.ubuntu.com precise-updates Release:Since there is no public key, the following signatures cannot be verified: NO_PUBKEY ECDCAD72428D7C01

This is because the source public key is not added, you can use the following command to add the source public key from ubuntu keyserver.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ECDCAD72428D7C01

The last parameter ECDCAD72428D7C01 is the PUBKEY reported above. For http://ddebs.ubuntu.com/, this value should be fixed.

3. Update source information

After adding the public key, execute the following command again to update the source information:

sudo apt-get update

4. Find and install the dbgsym package

After updating the source, you can find and install dbgsym just like installing a normal software package. When searching, you can add the "-dbgsym" suffix. If you want to find kernel-related dbgsym, you can use the following command to search:

sudo aptitude search 'linux-image-.*-dbgsym'

You can also bring the version number to directly search the dbgsym of the current kernel:

sudo aptitude search 'linux-image-'$(uname -r)'-dbgsym'

Since the Linux kernel version is also updated iteratively, it is possible that the current kernel version of dbgsym has been online and offline, and the corresponding dbgsym cannot be found and installed. At this time, it is recommended that the system reinstall a kernel version that has a corresponding dbgsym. If the latest version of the kernel is not strong If required, it is recommended to select an older but relatively stable version from the dbgsym list.

For example, I currently find the following dbgsym version list:

p   linux-image-3.13.0-30-generic-dbgsym                      - Linux kernel debug image for version 3.13.0 on 64 bit x86 SMP       
p   linux-image-3.13.0-30-generic-dbgsym:i386                 - Linux kernel debug image for version 3.13.0 on 32 bit x86 SMP       
p   linux-image-3.13.0-32-generic-dbgsym                      - Linux kernel debug image for version 3.13.0 on 64 bit x86 SMP       
p   linux-image-3.13.0-32-generic-dbgsym:i386                 - Linux kernel debug image for version 3.13.0 on 32 bit x86 SMP       
p   linux-image-3.13.0-65-generic-dbgsym                      - Linux kernel debug image for version 3.13.0 on 64 bit x86 SMP       
p   linux-image-3.13.0-65-generic-dbgsym:i386                 - Linux kernel debug image for version 3.13.0 on 32 bit x86 SMP       
p   linux-image-3.13.0-66-generic-dbgsym                      - Linux kernel debug image for version 3.13.0 on 64 bit x86 SMP       
p   linux-image-3.13.0-66-generic-dbgsym:i386                 - Linux kernel debug image for version 3.13.0 on 32 bit x86 SMP       
p   linux-image-3.13.0-67-generic-dbgsym                      - Linux kernel debug image for version 3.13.0 on 64 bit x86 SMP       
p   linux-image-3.13.0-67-generic-dbgsym:i386                 - Linux kernel debug image for version 3.13.0 on 32 bit x86 SMP       

Then I will choose to install the 3.13.0-32-generic version, linux-image and linux-headers are best installed at the same time, you can use the following command to install the corresponding kernel and dbgsym at the same time:

sudo aptitude install linux-{image,headers}-3.13.0-32-generic linux-image-3.13.0-32-generic-dbgsym

linux-image recommends (suggests) install linux-headers, but not recommended (recommends). When using aptitude to install the software package, the recommended software packages will be installed by default, but the recommended software packages are not controlled. There are usually many recommended software packages. It is not needed, if you need to install it, you can specify it manually.

Since the official source of dbgsym is abroad and no mirror is found, downloading and installing from the source is usually very slow. You can also copy the downloaded installation package and install it with dpkg -i:

sudo dpkg -i linux-image-3.13.0-32-generic-dbgsym_3.13.0-32.57~precise1_amd64.ddeb

Recommended Posts

(Reproduced) Ubuntu install dbgsym (debug-info)
ubuntu18.04 install python2
ubuntu18.04 install docker
ubuntu12.04 install python3
Ubuntu install guide
ubuntu install nodejs
ubuntu 16 install asp.net
ubuntu install leanote
ubuntu install Jenkins
docker install ubuntu
ubuntu install elasticsearch
ubuntu16.0.1 install pagoda
ubuntu18.04 install python
ubuntu 18.04 install teamviewer
ubuntu install sendmail
Install apache+PHP under Ubuntu
install vscode on ubuntu18
Install node.js under Ubuntu
Install mysql-pytho in Ubuntu
ubuntu install zsh terminal
Install Redis on Ubuntu
Install R4 on ubuntu20
Install nvtop on Ubuntu 18.04
Install python3.6 under Ubuntu 16.04
Install docker on Ubuntu
Ubuntu18.04 install opencv 3.2.0 solution
Install mysql under Ubuntu 16.04
Install Thrift under ubuntu 14.10
Install OpenJDK10 under Ubuntu
Install Caffe under Ubuntu 14.04
Install Docker on ubuntu18.04
Install nodejs10 on Ubuntu16
ubuntu install harbor warehouse
Install mysql on Ubuntu 14.04
Ubuntu16.04 install Mongodb tutorial
Install Django on ubuntu
Install Pytorch+CUDA on Ubuntu 16.04
2018-09-11 Install arduino under Ubuntu
Install Python3 on Ubuntu 14.04
Ubuntu18.04 install Asterisk16.10 + FreePBX15.0
Ubuntu19 install MySQL pit
ubuntu16.04 install node.js, npm
Install rJava on Ubuntu18
Install JDK10+ on Ubuntu
pcduino ubuntu install os
Install python in Ubuntu
Install JDK in Ubuntu19.10
Install Python3 on Ubuntu 16.04
Install ROS under ROS Ubuntu 18.04[2]
Install MySQL under Ubuntu
Install KDE on Ubuntu16.04.2
ubuntu install nginx server
Install Yarm-PM2 under Ubuntu
Install Docker on Ubuntu18
Install Python3.7 on Ubuntu
Install flashplayer on Ubuntu
ubuntu: install camera driver
ubuntu14.04 install jdk1.8 tutorial
Install VMware Tools in Ubuntu 18.04
ubuntu16.04 install caffe cpu version
Install ubuntu on virtual machine