먼저, 설치가 중단된 문제의 커널 헤더 패키지를 강제로 지워야 합니다.
Bash
sudo dpkg --remove --force-remove-reinstreq linux-headers-6.17.12-061712-generic
만약 위 명령어로 지워지지 않는다면 아래 명령어를 사용하세요.
Bash
sudo apt-get remove linux-headers-6.17.12-061712-generic
에러 메시지에서 시스템이 친절하게(?) 추천해 준 복구 명령어를 실행해서 apt 상태를 정상으로 되돌립니다.
Bash
sudo apt --fix-broken install
의존성 문제로 남은 찌꺼기 패키지들이 있다면 마저 정리해 줍니다.
Bash
sudo apt autoremove
이제 뱃속이 편안해졌으니, 원래 목적이셨던 curl 설치와 ROS 키 다운로드를 다시 진행하시면 됩니다.
Bash
sudo apt update
sudo apt install curl -y
sudo curl -sSL <https://raw.githubusercontent.com/ros/rosdistro/master/ros.key> -o /usr/share/keyrings/ros-archive-keyring.gpg