Эта проблема может быть связана с ROS полностью, однако, в настоящее время, я не уверен в источнике ошибки. Следовательно я отправляю его в этом многочисленном сообществе.
Я пытаюсь установить ROS, Мелодичный на Ubuntu 18.04.2 LTS ПК. К сожалению, команда sudo apt install ros-melodic-desktop-full
неудавшийся. Ниже вывод той же команды, при выполнении снова:
ravi@lab:~$ sudo apt install ros-melodic-desktop-full
Reading package lists... Done
Building dependency tree
Reading state information... Done
ros-melodic-desktop-full is already the newest version (1.4.1-0bionic.20190204.220757).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
python-rosdistro-modules : Depends: python-rospkg-modules but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Это предлагает работать apt --fix-broken install
который я сделал, но это не решает проблему. Посмотрите ниже:
ravi@lab:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libllvm6.0:i386 python-genmsg python-genpy python-roscpp-msgs python-rosgraph python-rosgraph-msgs python-std-msgs x11proto-dri2-dev x11proto-gl-dev
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
python-rospkg-modules
The following NEW packages will be installed:
python-rospkg-modules
0 upgraded, 1 newly installed, 0 to remove and 53 not upgraded.
461 not fully installed or removed.
Need to get 0 B/23.4 kB of archives.
After this operation, 133 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 542662 files and directories currently installed.)
Preparing to unpack .../python-rospkg-modules_1.1.7-1_all.deb ...
Unpacking python-rospkg-modules (1.1.7-1) ...
dpkg: error processing archive /var/cache/apt/archives/python-rospkg-modules_1.1.7-1_all.deb (--unpack):
trying to overwrite '/usr/lib/python2.7/dist-packages/rospkg/manifest.py', which is also in package python-rospkg 1.1.4-1
Errors were encountered while processing:
/var/cache/apt/archives/python-rospkg-modules_1.1.7-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Я думал о рабочем обновлении и обновлении, но застрял в той же проблеме. Посмотрите ниже:
ravi@lab:~$ sudo apt update
Hit:1 http://ny-mirrors.evowise.com/ubuntu bionic InRelease
Hit:2 http://linux.teamviewer.com/deb stable InRelease
Hit:3 http://ny-mirrors.evowise.com/ubuntu bionic-updates InRelease
Hit:4 http://ny-mirrors.evowise.com/ubuntu bionic-backports InRelease
Hit:5 http://ny-mirrors.evowise.com/ubuntu bionic-security InRelease
Ign:6 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:7 http://dl.google.com/linux/chrome/deb stable Release
Hit:8 http://packages.ros.org/ros/ubuntu bionic InRelease
Hit:10 http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu bionic InRelease
Hit:12 http://ppa.launchpad.net/gezakovacs/ppa/ubuntu bionic InRelease
Hit:11 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease
Hit:13 http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu bionic InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
53 packages can be upgraded. Run 'apt list --upgradable' to see them.
ravi@lab:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
python-rosdistro-modules : Depends: python-rospkg-modules but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Я также пытался удалить ros-melodic-desktop-full
пакет, но добрался напрасно как показано ниже:
ravi@lab:~$ sudo apt purge --remove ros-melodic-desktop-full
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
python-rosdistro-modules : Depends: python-rospkg-modules but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Я не могу продолжить двигаться. Я нашел возможное обходное решение здесь, которые предлагают удалить python-rospkg
пакет, но это не работало также. Посмотрите ниже:
ravi@lab:~$ sudo dpkg -P python-rospkg
[sudo] password for ravi:
dpkg: dependency problems prevent removal of python-rospkg:
ros-melodic-roscreate depends on python-rospkg.
ros-melodic-rosunit depends on python-rospkg.
ros-melodic-roslaunch depends on python-rospkg (>= 1.0.37); however:
Package python-rospkg is to be removed.
ros-melodic-rosgraph depends on python-rospkg; however:
Package python-rospkg is to be removed.
ros-melodic-rosbag depends on python-rospkg; however:
Package python-rospkg is to be removed.
ros-melodic-rqt-robot-steering depends on python-rospkg.
ros-melodic-roslib depends on python-rospkg (>= 1.0.37).
ros-melodic-rqt-pose-view depends on python-rospkg; however:
Package python-rospkg is to be removed.
ros-melodic-qt-gui-py-common depends on python-rospkg.
python-rosdep depends on python-rospkg (>= 1.0.37); however:
Package python-rospkg is to be removed.
ros-melodic-rqt-publisher depends on python-rospkg.
ros-melodic-rqt-console depends on python-rospkg.
ros-melodic-rosmake depends on python-rospkg.
ros-melodic-rqt-plot depends on python-rospkg.
ros-melodic-qt-gui depends on python-rospkg.
ros-melodic-rqt-msg depends on python-rospkg.
ros-melodic-rosclean depends on python-rospkg.
ros-melodic-roswtf depends on python-rospkg; however:
Package python-rospkg is to be removed.
ros-melodic-rospy depends on python-rospkg.
ros-melodic-rqt-graph depends on python-rospkg.
ros-melodic-rqt-robot-monitor depends on python-rospkg.
ros-melodic-rqt-service-caller depends on python-rospkg.
ros-melodic-rqt-runtime-monitor depends on python-rospkg.
ros-melodic-rqt-py-console depends on python-rospkg.
ros-melodic-resource-retriever depends on python-rospkg; however:
Package python-rospkg is to be removed.
ros-melodic-rqt-dep depends on python-rospkg.
ros-melodic-rqt-tf-tree depends on python-rospkg.
ros-melodic-rosmsg depends on python-rospkg.
ros-melodic-rqt-web depends on python-rospkg.
ros-melodic-rqt-bag depends on python-rospkg.
ros-melodic-rqt-shell depends on python-rospkg.
ros-melodic-rqt-topic depends on python-rospkg.
ros-melodic-rqt-logger-level depends on python-rospkg.
dpkg: error processing package python-rospkg (--purge):
dependency problems - not removing
Errors were encountered while processing:
python-rospkg
У меня нет подсказки теперь о фиксации его. Ниже больше информации о ПК:
ravi@lab:~$ python --version
Python 2.7.15rc1
ravi@lab:~$ uname -a
Linux lab 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
ravi@lab:~$ cat /etc/issue
Ubuntu 18.04.2 LTS \n \l
Какое-либо обходное решение?
Я столкнулся с этой той же проблемой и записал сценарий для удаления пакетов установки ROS. Я должен был выполнить его многократно как это, пока не было никакого вывода.
Вот сценарий
import os
import sys
import re
data = sys.stdin.read()
lines = data.split('\n')
pkgPat = " [a-zA-Z0-9\-]* : Depends: .*"
pkgNamePat = " [a-zA-Z0-9\-]* :"
relLines = []
for line in lines:
if(re.match(pkgPat, line) is not None):
relLines.append(line)
for line in relLines:
pkg = re.search(pkgNamePat, line)[0][1:-2]
if pkg is not None:
os.system('sudo dpkg -r --force-all ' + pkg)
else:
print("None: " + line)
Выполните его многократно, пока нет никакого вывода с (сценарий называют fixros.py:
sudo apt-get autoremove | fixros.py
sudo dpkg -r --force-all python-rospkg
После этого sudo apt --fix-broken install
Если вы хотите переустановить ros, запустите sudo apt-get remove ros-*
, чтобы удалить ros. Затем установите ROS из https://wiki.ros.org/ROS/Installation
Просто сделай :
sudo dpkg -P --force-all PACKAGETOREMOVE
sudo apt --fix-broken install
sudo apt-get clean
sudo apt-get autoremove