
나는 내 wsl에 ROS(배포판이 멜로디임)를 올바르게 설치했음을 확신하며 전체 패키지를 올바르게 다운로드하기 위해 모든 단계를 따랐지만 명령줄 roslaunch 또는 roslaunch와 관련된 모든 것을 사용했다는 것을 알고 있습니다. 나를 이 메시지로 다시 안내할 뿐입니다
Command 'roslaunch' not found, but can be installed with:
sudo apt install python-roslaunch
명령줄을 입력하면
sudo apt install python-roslaunch
그러면 그것은 나를 다음으로 이끌 것이다
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python-roslaunch : Depends: python-roslib but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
python-roslib를 설치하면 위와 유사한 또 다른 오류가 발생합니다. 나는 모든 것을 시도했습니다. 모든 것을 다시 설치하는 것부터 rootf 디렉토리에 있는 파일을 만지는 것까지, 그러나 지금까지는 아무것도 작동하지 않았습니다. 적어도 무엇이 잘못되었는지 알아내는 데 도움이 될 수 있는 모든 것이 있으면 감사하겠습니다.
답변1
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get update --fix-missing
$ sudo apt-get autoclean
$ apt-get clear cache
답변2
다음은 오류를 수정하는 빠르고 쉬운 방법입니다 you have held broken packages
.
source.list 파일을 열고
/etc/apt/sources.list
현재 사용 중인 Ubuntu 릴리스와 다른 Ubuntu 릴리스에 대한 소프트웨어 소스가 없는지 확인하십시오. source.list에서 잘못된 릴리스 라인을 발견한 경우 를 사용하여 source.list 파일을 열고sudoedit /etc/apt/sources.list
, source.list의 잘못된 라인 앞에 문자를 추가하여 주석 처리한 다음#
, source.list 파일을 저장하고 실행하여sudo apt update
목록을 업데이트합니다. 사용 가능한 소프트웨어 패키지.선택손상된 패키지 수정Synaptic 패키지 관리자의 옵션. 다음 명령을 실행하여 Synaptic을 설치하십시오.
sudo apt update sudo apt upgrade sudo apt install synaptic
Synaptic을 열고 Synaptic에서 선택편집하다->손상된 패키지 수정그런 다음 반복편집하다->손상된 패키지 수정두 번째.
왼쪽 창의 Synaptic에서맞춤 필터아래 스크린샷에서 마우스 커서로 표시된 버튼입니다. 왼쪽 상단에 있는 목록에서 선택하세요.고장난. 가운데 창에는 여전히 복구가 필요한 손상된 패키지가 나열됩니다.
Select the broken packages one at a time. Select a broken package, and then open the terminal and run <code>apt policy <b><package-name></b></code>. The results of this command will tell you if that broken package was installed from the default Ubuntu repositories or from some other source. If the broken package was installed from some other source, maybe that package can be removed along with its software source and replaced by a different version of the same package from the default Ubuntu repositories. Usually this means fixing a broken package by downgrading that package to an older version.
이 오류 메시지가 나타나는 경우:
Try 'apt-get -f install' with no packages (or specify a solution)
다음 명령을 실행하십시오.
sudo apt update sudo apt upgrade sudo apt-get -f install
손상된 패키지를 수동으로 제거합니다.
패키지 찾기
/var/lib/dpkg/info
ls -l /var/lib/dpkg/info | grep <package>
패키지 폴더를 다른 위치로 이동합니다.
cd /tmp && sudo mkdir new-package-location sudo mv /var/lib/dpkg/info/<package>.* /tmp/new-package-location/
다음 명령을 실행하십시오.
sudo dpkg --remove --force-remove-reinstreq <package>
이러한 방법이 모두 작동하지 않으면 운영 체제에 너무 깊이 내장되어 있어 이러한 방법 중 어느 것도 영향을 미치지 않는 무언가로 인해 손상된 패키지가 발생할 수 있습니다. 깊이 내장된 "무언가"를 찾을 수 있는 첫 번째 확실한 장소는 /etc/apt/sources.list
. Sources.list 파일을 확인하여 손상된 패키지 오류를 일으킬 수 있는 비표준 행이 포함되어 있는지 확인하세요. 표준 우분투의 source.list 파일은 다음의 source.list 파일과 유사합니다.이 답변.
source.list에서 의심스러운 줄을 제거하는 올바른 방법은 앞에 문자를 붙여서 주석 처리하는 것입니다 #
. 그런 다음 실행하여 sudo apt update
사용 가능한 소프트웨어 목록을 새로 고칩니다.