Not so long ago I had the following issue:
The following packages have unmet dependencies. libc6-dev : Breaks : libgcc-9-dev (< 22.214.171.124~) but 9.2.1-19 is to be installed
I was trying to install Blueman to be able to easily deal with my Bluetooth devices on Kali Linux, and then this error popped up.
2.1. Find the var/lib/dpkg/status file and open it with handy text editor
To solve this issue, we need to open the var/lib/dpkg/status file with one of the text editors and remove info related to libgcc-9-dev. For this purpose, we'll be using nano text editor:
sudo nano /var/lib/dpkg/status （通过这个命令修改包）
You'll notice that the file consists of a list of package names and their statuses. Our goal here is to locate libgcc-9-dev package info block.
2.2. Locate the libgcc-9-dev package info in the file and remove it
然后找到下面有问题版本的包删除直到homepage那一行，然后再更新apt update 和apt upgrade
So, look for the following block in the text: （小技巧Linux中不好操作可使用python3 -m http.server 下载后本地notepad修改后再在本地启动服务wget一下局域网注意打开端口转发）
Package: libgcc-9-dev Status: install ok installed Priority: important .... .... Homepage: http://gcc.gnu.org/
When you find it, delete the whole block, from the Package to the Homepage line and after that save and close the file.
2.3. Update & Upgrade
After you removed the libgcc-9-dev block from the status file, do the system update&upgrade:
sudo apt-get update sudo apt-get upgrade
2.4. Fix broken installations
Execute the following command to fix broken installations:
sudo apt --fix-broken install
In this short tutorial we showed how to solve libc6-dev : Breaks : libgcc-9-dev (< 126.96.36.199~) but 9.2.1-19 is to be installed issue.