Errors with every package/program installation Ubuntu 12.04 - python

This problem occur after I try to use the script to install Maya 2014 and because I failed with some libraries, I used synaptic package manager to completely remove Maya and I used
sudo rm -r /usr/autodesk
After that I used Terminal to install Skype and get this error message
Setting up composite-2014 (2014.0-862716) ...
python: can't open file '/usr/autodesk/Composite_2014/etc/configure.py': [Errno 2] No such file or directory
dpkg: error processing composite-2014 (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
composite-201400
E: Sub-process /usr/bin/dpkg returned an error code (1)
I will now install Wine and put the whole process and it will be more clear where the error occur.
Here's the installation process
Errors were encountered while processing:
composite-2014
E: Sub-process /usr/bin/dpkg returned an error code (1)

try this commands:
apt-get install -f
dpkg-reconfigure -a
maybe helps

If the last answer don't work as well (like it happens to me .. and its rear)
Just "Fake" /usr/autodesk/Composite_2014/etc/configure.py
Open the Terminal (ctl+alt+t)
sudo nautilus
Browse to /usr/autodesk and create Composite_2014/etc/configure.py (one by one)
good luck

Related

apt - dpkg python-rpi.gpio dependency problems

Every time i try to install something, upgrade or autoremove this error happens!
I've searched the web and tried some fixes but they don't seem to work, I don't have python2.7 installed only 3 and can't install python2 or anything because of this. I've tryed to sudo rm python-rpi.gpio_0.7.0-0.1~bpo10+4_armhf.deb but the file will keep comming. Pls I really need some help since I've got some work on my pi and don't want to get a new image
sudo apt autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
python-rpi.gpio
The following packages will be upgraded:
python-rpi.gpio
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
18 not fully installed or removed.
Need to get 0 B/20.7 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Reading changelogs... Done
(Reading database ... 152893 files and directories currently installed.)
Preparing to unpack .../python-rpi.gpio_0.7.0-0.1~bpo10+4_armhf.deb ...
/var/lib/dpkg/info/python-rpi.gpio.prerm: 6: /var/lib/dpkg/info/python-rpi.gpio.prerm: pyclean: Too many levels of symbolic links
dpkg: warning: old python-rpi.gpio package pre-removal script subprocess returned error exit status 2
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: pyclean: Too many levels of symbolic links
dpkg: error processing archive /var/cache/apt/archives/python-rpi.gpio_0.7.0-0.1~bpo10+4_armhf.deb (--unpack):
new python-rpi.gpio package pre-removal script subprocess returned error exit status 2
/var/lib/dpkg/info/python-rpi.gpio.postinst: 6: /var/lib/dpkg/info/python-rpi.gpio.postinst: pycompile: Too many levels of symbolic links
dpkg: error while cleaning up:
installed python-rpi.gpio package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/python-rpi.gpio_0.7.0-0.1~bpo10+4_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Some notes: I really really don't want to change the SD Card and parcially lose what I have, second I've tried sudo apt-get install -f and sudo apt update --fix-missing when i followed this guide the sudo dpkg --remove --force-remove --reinstreq command was showing this error dpkg: error: unknown force/refuse option 'remove'
As it turns out I still had remainnings of Python2 and Python3 binaries and those were not linked properly by the OS, this means that Python3 was linked to Python2 and vice-versa.
To get it working I had to:
Uninstall the Python2 dependencies
Get the link working correctly
Reinstall Python2 with wget
Verify if all links are working correctly (for Raspbian this means):
python --version links to Python2
python2 --version links to Python2
python3 --version links to Python3
Use the following commands:
sudo dpkg -i --force-overwrite /var/cache/apt/archives//python-rpi.gpio_0.7.0-0.1~bpo10+4_armhf.deb
Still have the same problem, use:
sudo mv /var/lib/dpkg/info/python-rpi.gpio.* /tmp/
sudo dpkg --remove --force-remove-reinstreq python-rpi.gpio
A typo in your command sudo dpkg --remove --force-remove --reinstreq isn't valide. The correct option is --force-remove-reinstreq. See dpkg --force-help.

Unable to install box2d

I run this command:
apt-get install python-box2d
and I get the following output:
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
Always prefix sudo before executing any installation related command no matter if it's pip or aptik, it tells the terminal that you have the authority to make this change (installation).
For example:
sudo apt-get update
It's for updating your repository , and so it needs to be authorized to get executed.
Also sometimes this error occurs when some other installation is in progress and it has locked the main directory , So you just have to wait for that process or installation to get completed.

Elasticsearch Errors while doing any operation with system?

I have installed Elasticsearch and now due to some changes done by other folks at my work place some errors keep on popping up during any operation like update, install a new package and also the elasticsearch is not working properly.
Error Log is attached for installing new package.
$ sudo apt-get install bash-completion
Reading package lists... Done
Building dependency tree
Reading state information... Done
bash-completion is already the newest version (1:2.1-4.2ubuntu1.1).
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up elasticsearch (5.5.0) ...
Failed to restart systemd-sysctl.service: No such method 'RestartUnit'
See system logs and 'systemctl status systemd-sysctl.service' for details.
dpkg: error processing package elasticsearch (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
elasticsearch
E: Sub-process /usr/bin/dpkg returned an error code (1)
I even tried different solutions from online like trying to remove elasticsearch completely from system.
Steps I followed.
sudo rm -rf /var/lib/elasticsearch
sudo rm -rf /etc/elasticsearch
sudo apt-get install -f
$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up elasticsearch (5.5.0) ...
Failed to restart systemd-sysctl.service: No such method 'RestartUnit'
See system logs and 'systemctl status systemd-sysctl.service' for details.
dpkg: error processing package elasticsearch (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
elasticsearch
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo apt-get --purge autoremove elasticsearch
$ sudo apt-get --purge autoremove elasticsearch
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
elasticsearch*
0 upgraded, 0 newly installed, 1 to remove and 15 not upgraded.
1 not fully installed or removed.
After this operation, 37.3 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 329402 files and directories currently installed.)
Removing elasticsearch (5.5.0) ...
Stopping elasticsearch service...Failed to stop elasticsearch.service: Unknown unit: elasticsearch.service
See system logs and 'systemctl status elasticsearch.service' for details.
Failed to get load state of elasticsearch.service: No such property 'LoadState'
dpkg: error processing package elasticsearch (--purge):
subprocess installed pre-removal script returned error exit status 1
Failed to restart systemd-sysctl.service: No such method 'RestartUnit'
See system logs and 'systemctl status systemd-sysctl.service' for details.
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
elasticsearch
E: Sub-process /usr/bin/dpkg returned an error code (1)
I restarted the system but the error keep on appearing again and again.
Any one with suggestions on how to solve this issue?
Also this command gives nothing
$ systemctl status systemd-sysctl.service
Failed to get properties: No such interface ''
is systemd your init service in this installation? Also what linux distribution is this? Which version of your distribution? I am currently thinking that you might not be using systemd, but the elasticsearch package is assuming this somehow.
I'd highly appreciate if you open up a bug report in the elasticsearch repository with all of the above information, this warrants more research on the ES side (disclaimer: I'm an ES developer and keen to get this fixed :-).
Also: You can try to remove the elasticsearch package completely by running dpkg -P elasticsearch.
And in addition you can try to add set -x to /var/lib/dpkg/info/elasticsearch.postinst and run sh /var/lib/dpkg/info/elasticsearch.postinst configure
to get more debugging output
I had quite the same problem.
It is obiviously related to systemctl, not elasticsearch.
First you have to determine if u are using it.
[[ `systemctl` =~ -\.mount ]] && echo yes || echo no
In my case, the answer was "no"
So you have to enable it.

how to remove entirely the python directory?

Please help me to resolve this issue about the removing of the python directory. There is the stack trace of my bug when I try to remove the python directory using the following command apt-get autoremove python
ImportError: No module named debpython
dpkg: error processing python-pkg-resources (--remove):
subprocess installed pre-removal script returned error exit status 1
Removing python-psutil ...
Traceback (most recent call last):
File "/usr/sbin/update-python-modules", line 16, in <module>
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
have you tried
sudo apt-get purge *your-program-name*
this will totally (well... almost) delete your program and its library(ies)
Hope this helps
Well, I find the solution and it's works for me when I use the following command:
$ pip uninstall python

datastax opscenter installation failed with 'no such option: --post-install' error

Background:
I have a 3 node cassandra (1.2.5) cluster and I am trying to install datastax on one of the nodes. I am following instructions from: http://www.datastax.com/docs/opscenter/install/install_deb
I have following already installed:
java -version = 1.6.0_24
python -V = 2.6.6
openssl version = 0.9.8g 19 Oct 2007
Issue:
When I run 'sudo apt-get install opscenter-free', the installation starts but errors out with:
update-python-modules: error: no such option: --post-install
dpkg: error processing opscenter-free (--configure):
subprocess post-installation script returned error exit status 2
Possible root cause:
By searching for error I could gather it looks like python issue.
I ran ls to see where python resides, here some results:
ls /usr/local/bin = python python2.6 python2.7
ls /usr/bin/ = python python2.5
As specified before if I run 'python -V' result is 2.6.6.
I don't understand how to make my opscenter installer to look at the appropriate version?
or how to understand which python it is referring to?
This is most likely an issue with the following from the opscenter-free package:
# cause any deferred python module compilation (like for telephus) to be done
# now, before the initscript starts
if which update-python-modules >/dev/null 2>&1; then
update-python-modules --post-install
fi
update-python-modules comes with the python-support package. It looks like the binary is available, but whatever version the install process is finding doesn't recognize the --post-install option.
If which update-python-modules points to an older (<= 2.5) or newer (3.0+) version of the script, you can try removing whatever package is including that, or updating the python-support package.

Categories