Come installare un pacchetto che contiene i simboli di debug del kernel Ubuntu?


19

Il -genericpacchetto predefinito del kernel Ubuntu non sembra contenere simboli.

Sto cercando di evitare di compilare manualmente un kernel con le informazioni di debug.

Ubuntu fornisce un pacchetto con simboli di debug del kernel?

Risposte:


25
  1. Innanzitutto creare un ddebs.listutilizzo:

    echo "deb http://ddebs.ubuntu.com $(lsb_release -cs) main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/ddebs.list
  2. Quindi aggiungere la chiave GPG per ddebs.ubuntu.com:

    wget -O - http://ddebs.ubuntu.com/dbgsym-release-key.asc | sudo apt-key add -
  3. Quindi eseguire:

    sudo apt-get update
  4. Quindi installare il pacchetto simboli usando:

    sudo apt-get install linux-image-`uname -r`-dbgsym

    Questo è piuttosto enorme (> 680 MB), quindi preparati ad aspettare mentre lo scarichi.

Uso i simboli di debug del kernel Linux per strumenti come systemtapsul kernel.


apt-cache search dbgsymrestituisce pkg-create-dbgsymsolo, era in qualche altro repository?
margherita,

3
@ warl0ck Sì, i -dbgsympacchetti sono in repository speciali che è necessario abilitare per installarli. Questo spiega come .
Eliah Kagan,

Ora ho aggiornato il post per chiarire come farlo.
Colin Ian King,

il passaggio apt-get updategenera un messaggio di avviso: 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è per questo che lo sto estendendo con una soluzione per quel caso.
Pro Backup

1
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'
Kenny Evitt,

7

Ho provato la risposta di Colin Ian King e non ha funzionato per me. Ho scoperto che devo aggiungere altre due righe/etc/apt/sources.list.d/ddebs.list

Modifica il file tramite

sudo nano /etc/apt/sources.list.d/ddebs.list

e aggiungi le due righe seguenti

deb http://ddebs.ubuntu.com trusty-updates main restricted universe multiverse
deb http://ddebs.ubuntu.com trusty-proposed main restricted universe multiverse

Sostituisci trustycon la versione che ottieni quando esegui

lsb_release -cs

1
Questo funziona per me!
Howard Shane,

7

Per 16.04+ :

Importazione chiave GPG

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

Aggiungi la configurazione del repository

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

(merito a Ubuntu Wiki )

Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.