업그레이드 중 오류 발생

업그레이드 중 오류 발생

터미널을 사용하여 Ubuntu 12.10을 업그레이드하는 동안 sudo apt-get upgrade이 오류가 발생합니다.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 libtinyxml-dev : Depends: libtinyxml (= 2.6.2-2~ppa1) but it is not installed
E: Unmet dependencies. Try using -f.

모든 방법을 시도했지만 문제를 해결할 수 없었습니다. 다음은 적절한 명령의 결과입니다. 시도해 보았는데 sudo apt-cache search libtinyxml결과는 다음과 같습니다.

root@nadirhajiyev:/home/nadirhajiyev# sudo apt-cache search libtinyxml
libtinyxml-dev - TinyXml library - header and static library
libtinyxml-doc - TinyXml library - documentation files
libtinyxml2-0.0.0 - C++ XML parsing library
libtinyxml2-dev - TinyXML2 library - header and static library
libtinyxml2.6.2 - C++ XML parsing library
libtinyxml2.6.2-dbg - TinyXml library - debug files
libtinyxml2.5.3 - dummy transitional package from libtinyxml2.5.3 to libtinyxml
libtinyxml2.5.3-dbg - dummy transitional package from libtinyxml2.5.3-dbg to libtinyxml-dbg
libtinyxml - C++ XML parsing library
libtinyxml-dbg - TinyXml library - debug files

그 다음에 apt-get install -y libtinyxml libtinyxml-dev:

root@nadirhajiyev:/home/nadirhajiyev# apt-get install -y libtinyxml libtinyxml-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libtinyxml-dev is already the newest version.
libtinyxml-dev set to manually installed.
The following packages were automatically installed and are no longer required:
  erlang-base erlang-crypto erlang-syntax-tools libqt4-webkit:i386 libsctp1 linux-headers-3.5.0-17 lksctp-tools
  ros-groovy-orocos-kinematics-dynamics 
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  libtinyxml
0 upgraded, 1 newly installed, 0 to remove and 249 not upgraded.3 not fully installed or removed.
Need to get 0 B/35.4 kB of archives.
After this operation, 139 kB of additional disk space will be used.
(Reading database ... 260756 files and directories currently installed.) 
Unpacking libtinyxml (from .../libtinyxml_2.6.2-2~ppa1_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/libtinyxml_2.6.2-2~ppa1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/libtinyxml.so.2.6.2', which is also in package libtinyxml2.6.2 2.6.2-1build1
Errors were encountered while processing:
 /var/cache/apt/archives/libtinyxml_2.6.2-2~ppa1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

그 다음에 apt-get install -y --reinstall libtinyxml libtinyxml-dev:

root@nadirhajiyev:/home/nadirhajiyev# apt-get install -y libtinyxml libtinyxml-dev --reinstall
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  erlang-base erlang-crypto erlang-syntax-tools libqt4-webkit:i386 libsctp1 linux-headers-3.5.0-17 lksctp-tools
  ros-groovy-orocos-kinematics-dynamics
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  libtinyxml
0 upgraded, 1 newly installed, 1 reinstalled, 0 to remove and 249 not upgraded.
3 not fully installed or removed.
Need to get 0 B/35.4 kB of archives. 
After this operation, 139 kB of additional disk space will be used.
E: Internal Error, No file name for libtinyxml-dev:amd64

마침내 나는 그것을 제거하려고 시도했지만 다음과 같은 결과를 얻었습니다.

root@nadirhajiyev:/home/nadirhajiyev# apt-get purge -y libtinyxml libtinyxml-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'libtinyxml' is not installed, so not removed
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
  ros-groovy-nodelet : Depends: libtinyxml-dev but it is not going to be installed
  ros-groovy-pluginlib : Depends: libtinyxml-dev but it is not going to be installed
  ros-groovy-rospack : Depends: libtinyxml-dev but it is not going to be installed
  ros-groovy-simulator-gazebo : Depends: libtinyxml-dev but it is not going to be installed
  ros-groovy-srdf : Depends: libtinyxml-dev but it is not going to be installed
  ros-groovy-srdfdom : Depends: libtinyxml-dev but it is not going to be installed
  ros-groovy-urdfdom : Depends: libtinyxml-dev but it is not going to be installed
  ros-groovy-urdfdom-headers : Depends: libtinyxml-dev but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

답변1

시스템에 일부 종속성이 누락되어 이를 수정해야 합니다. 다음 명령 시퀀스를 실행해 보십시오.

$ sudo apt-get update && sudo apt-get -f install -y && sudo apt-get upgrade

작동하지 않고 계속해서 이 오류 메시지가 표시되면 다음을 실행해 보세요.

$ sudo apt-get -m upgrade

누락된 패키지는 무시하지만 약간 위험할 수 있습니다.

답변2

마침내 나는 문제를 해결할 수 있었다. 문제는 깨진 종속성에 관한 것이었습니다. 그래서 먼저 다시 빌드한 sudo apt-get build-dep다음 sudo apt-get check. 깨진 종속성을 구축한 다음 성공적으로 사용할 수 있습니다 sudo apt-get upgrade. :)

관련 정보