Finalmente eu fiz isso
Excluir cabeçalhos
sudo rm -rf /usr/src/linux-headers-4.4.0-51-generic
Reinstalar cabeçalhos
sudo apt install --reinstall linux-headers-4.4.0-51-generic
Isso é tudo que foi necessário.
Preciso de ajuda com o Ubuntu 16.04
Não consigo instalar nenhum programa ou fazer uma atualização do sistema.
$ sudo apt install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-headers-4.4.0-51-generic
0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
1 not fully installed or removed.
After this operation, 7.325 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 260709 files and directories currently installed.)
Removing linux-headers-4.4.0-51-generic (4.4.0-51.72) ...
dpkg: error processing package linux-headers-4.4.0-51-generic (--remove):
unable to securely remove '/usr/src/linux-headers-4.4.0-51-generic/include/config/rds/rdma.h': Not a directory
Errors were encountered while processing:
linux-headers-4.4.0-51-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
Removendo cabeçalhos
$ sudo dpkg --remove linux-headers-4.4.0-51 linux-headers-4.4.0-51-generic
dpkg: warning: ignoring request to remove linux-headers-4.4.0-51 which isn't installed
(Reading database ... 260709 files and directories currently installed.)
Removing linux-headers-4.4.0-51-generic (4.4.0-51.72) ...
dpkg: error processing package linux-headers-4.4.0-51-generic (--remove):
unable to securely remove '/usr/src/linux-headers-4.4.0-51-generic/include/config/rds/rdma.h': Not a directory
Errors were encountered while processing:
linux-headers-4.4.0-51-generic
$ df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
udev 489035 505 488530 1% /dev
tmpfs 494061 663 493398 1% /run
/dev/sda1 7077888 363740 6714148 6% /
tmpfs 494061 21 494040 1% /dev/shm
tmpfs 494061 5 494056 1% /run/lock
tmpfs 494061 16 494045 1% /sys/fs/cgroup
tmpfs 494061 41 494020 1% /run/user/1000
$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 1,9G 0 1,9G 0% /dev
tmpfs 386M 6,1M 380M 2% /run
/dev/sda1 107G 11G 91G 11% /
tmpfs 1,9G 3,9M 1,9G 1% /dev/shm
tmpfs 5,0M 4,0K 5,0M 1% /run/lock
tmpfs 1,9G 0 1,9G 0% /sys/fs/cgroup
tmpfs 386M 92K 386M 1% /run/user/1000
Finalmente eu fiz isso
Excluir cabeçalhos
sudo rm -rf /usr/src/linux-headers-4.4.0-51-generic
Reinstalar cabeçalhos
sudo apt install --reinstall linux-headers-4.4.0-51-generic
Isso é tudo que foi necessário.