Robotics StackExchange | Archived questions

Errors of python-catkin-pkg & python-rospkg-module

so, i uninstalled ROS manually about a week ago (the proper way would have been something like sudo apt-purge ros*) ..

and it has messed up my Ubuntu OS. now, whenever I try to update through the software update , i get the below error:

(Reading database ... 418124 files and directories currently installed.)
Preparing to unpack .../python-catkin-pkg-modules_0.3.7-1_all.deb ...
/var/lib/dpkg/info/python-catkin-pkg-modules.prerm: 6: /var/lib/dpkg/info/python-catkin-pkg-modules.prerm: pyclean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: pyclean: not found
dpkg: error processing archive /var/cache/apt/archives/python-catkin-pkg-modules_0.3.7-1_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/python-catkin-pkg-modules.postinst: 6: /var/lib/dpkg/info/python-catkin-pkg-modules.postinst: pycompile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Preparing to unpack .../python-rospkg-modules_1.1.3-1_all.deb ...
/var/lib/dpkg/info/python-rospkg-modules.prerm: 6: /var/lib/dpkg/info/python-rospkg-modules.prerm: pyclean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: pyclean: not found
dpkg: error processing archive /var/cache/apt/archives/python-rospkg-modules_1.1.3-1_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/python-rospkg-modules.postinst: 6: /var/lib/dpkg/info/python-rospkg-modules.postinst: pycompile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 /var/cache/apt/archives/python-catkin-pkg-modules_0.3.7-1_all.deb
 /var/cache/apt/archives/python-rospkg-modules_1.1.3-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

basically the main error is: Errors were encountered while processing: /var/cache/apt/archives/python-catkin-pkg-modules0.3.7-1all.deb /var/cache/apt/archives/python-rospkg-modules1.1.3-1all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

i have tried deleting the files, installed ROS again .. all without success. :(

Asked by titanum456 on 2017-10-09 15:25:38 UTC

Comments

Please explain what you mean by "uninstalled ROS manually". Also this isn't really a ROS problem but an apt/corrupted dpkg problem you're probably better off looking on other forums with apt/dpkg experts.

Asked by tfoote on 2017-10-09 20:40:54 UTC

@thfoote i deleted the folders which is relevant to ROS in my drive. Hmm, i ve attempted the software updater application and package manager application and it is not able to solve the problem. also, i uninstalled python and reisntalled it but the problem remains python-rospkg and python-catkin

Asked by titanum456 on 2017-10-10 13:47:58 UTC

You appear to have removed too many things including pycompile and pyclean which are core dependencies required to unpack the debian packages. They are found in python-minimal package. You are likely going to want to reinstall any debian package for which you have touched.

Asked by tfoote on 2017-10-10 14:38:23 UTC

There will be more experts for your corrupted dpkg/apt issues on Ubuntu and Debian forums such as: https://askubuntu.com/questions/790005/sub-process-usr-bin-dpkg-returned-an-error-code1/827344#827344 which I found quickly with related searches.

Asked by tfoote on 2017-10-10 14:40:30 UTC

If you can't find your solution by browsing I'd suggest you ask your question there. When you do the more details about what you did the easier people will be able to help you.

Asked by tfoote on 2017-10-10 14:41:08 UTC

the link u shared was not able to solve my problem. but yea i will ask in the ubuntu forums. thx!

Asked by titanum456 on 2017-10-10 15:05:51 UTC

Answers