└─$ sudo dpkg --install python-gobject-2_2.28.6-13+b1_arm64.deb
(Reading database ... 421153 files and directories currently installed.)
Preparing to unpack python-gobject-2_2.28.6-13+b1_arm64.deb ...
Unpacking python-gobject-2 (2.28.6-13+b1) over (2.28.6-13+b1) ...
dpkg: dependency problems prevent configuration of python-gobject-2:
python-gobject-2 depends on python (<< 2.8); however:
Package python is not installed.
python-gobject-2 depends on python (>= 2.7); however:
Package python is not installed.
python-gobject-2 depends on python:any (>= 2.6.6-7~).
python-gobject-2 depends on libffi6 (>= 3.2); however:
Package libffi6 is not installed.
dpkg: error processing package python-gobject-2 (--install):
dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.36-8) ...
Errors were encountered while processing:
python-gobject-2
I tried to install python dependencies to install zenmap, since I'm on a computer with arm64 architecture, I installed this particular package, but that didn't help either, tell me what to do
Related
I'm trying to install a module called simpleHTTPServer but can't do so as described below:
root#kali:~# pip install simpleHTTPServer
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
ERROR: Could not find a version that satisfies the requirement simpleHTTPServer (from versions: none)
ERROR: No matching distribution found for simpleHTTPServer
root#kali:~#
I've screwed up my python2.7 a few hours ago by accidentally removing (rm) the python2.7 file in /usr/bin instead of renaming it with mv because i didn't pay attention to what i was doing. So I removed everything that had to do with python2.7. I've then managed to download python 2.7.18 from the official site and executed these commands below AS ROOT:
cd /home/johnmap007/Downloads/Python-2.7.18
./configure
make
make install
python setup.py clean
python setup.py build
python setup.py install
Then I got back up and running. pip started to work ok and python gives me the interpreter when i execute it in the cmd line. I am running Kali Linux by the way. I tried installing other packages like scapy and they worked. I don't know why i can't install this specific package. Any help would be greatly appreciated. Thanks in advance!
EDIT: For some reason, as i was running apt upgrade, i got errors about python2.7 not being configured the right way:
Setting up python2.7 (2.7.18-1) ...
/var/lib/dpkg/info/python2.7.postinst: 9: /usr/bin/python2.7: not found
dpkg: error processing package python2.7 (--configure):
installed python2.7 package post-installation script subprocess returned error exit status 127
Setting up sqlmap (1.4.11-1) ...
Installing new version of config file /etc/sqlmap/sqlmap.conf ...
Setting up libgstreamer-plugins-base1.0-0:amd64 (1.18.1-1) ...
Setting up libgstreamer-plugins-base1.0-0:i386 (1.18.1-1) ...
dpkg: dependency problems prevent configuration of python2:
python2 depends on python2.7 (>= 2.7.18~); however:
Package python2.7 is not configured yet.
dpkg: error processing package python2 (--configure):
dependency problems - leaving unconfigured
Setting up seclists (2020.4-0kali1) ...
Setting up libgstreamer-gl1.0-0:amd64 (1.18.1-1) ...
Setting up gstreamer1.0-plugins-base:amd64 (1.18.1-1) ...
Setting up gstreamer1.0-plugins-base:i386 (1.18.1-1) ...
Setting up python3-cryptography (3.2.1-1) ...
Setting up libsvn1:amd64 (1.14.0-3) ...
dpkg: dependency problems prevent configuration of python2.7-dev:
python2.7-dev depends on python2.7 (= 2.7.18-1); however:
Package python2.7 is not configured yet.
dpkg: error processing package python2.7-dev (--configure):
dependency problems - leaving unconfigured
Setting up gstreamer1.0-gl:amd64 (1.18.1-1) ...
Setting up gstreamer1.0-x:amd64 (1.18.1-1) ...
Setting up gstreamer1.0-x:i386 (1.18.1-1) ...
Setting up gstreamer1.0-alsa:amd64 (1.18.1-1) ...
dpkg: dependency problems prevent configuration of python2-dev:
python2-dev depends on python2 (= 2.7.18-2); however:
Package python2 is not configured yet.
python2-dev depends on python2.7-dev (>= 2.7.18~); however:
Package python2.7-dev is not configured yet.
dpkg: error processing package python2-dev (--configure):
dependency problems - leaving unconfigured
Setting up gir1.2-gst-plugins-base-1.0:amd64 (1.18.1-1) ...
Setting up subversion (1.14.0-3) ...
Processing triggers for kali-menu (2020.4.0) ...
Processing triggers for libc-bin (2.31-4) ...
Processing triggers for man-db (2.9.3-2) ...
Errors were encountered while processing:
python2.7
python2
python2.7-dev
python2-dev
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
I have no idea what happened and i tried running dpkg --configure -a already. Can someone help me please?
That's in the standard library, so you don't need to install anything
https://docs.python.org/2/library/simplehttpserver.html
You can start it with
python -m SimpleHTTPServer
But you should use Python3, anyway, where it's renamed
python3 -m http.server
I removed everything that had to do with python2.7
You're modifying operating system files at that point, and Kali Linux uses Python for more than your own scripting purposes. But based on /usr/bin/python2.7: not found, you could start symlink-ing files around to fix at least that error
I'm trying to install Python3 package which was required to upgrade it to 16.04 LTS and then 18.04 OS. I've come across several links to solve it, but found no luck. Implemented following steps to remove and reinstall -
sudo mv /var/lib/dpkg/info/<packagename>.* /tmp/
sudo dpkg --remove --force-remove-reinstreq <packagename>
sudo apt-get remove <packagename>
sudo apt-get autoremove && sudo apt-get autoclean
However, seeing the same issues
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-gi is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
12 not fully installed or removed.
Need to get 0 B/8666 B of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
dpkg: error processing package python3 (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
dpkg: dependency problems prevent configuration of python3-distupgrade:
python3-distupgrade depends on python3:any (>= 3.3.2-2~); however:
Package python3 is not configured yet.
dpkg: error processing package python3-distupgrade (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
.....
.....
.....
.....
.....
.....
.....
dpkg: error processing package cloud-init (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of dh-python:
dh-python depends on python3:any (>= 3.3.2-2~); however:
Package python3 is not configured yet.
dpkg: error processing package dh-python (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
E: Sub-process /usr/bin/dpkg returned an error code (1)
Can anyone guide me through ??
I'm trying to install the QGIS on my Ubuntu 16, but I'm not able to do it.
First, I've tried to uninstall any QGIS version on my Ubuntu, such as described here and here
After that, I tried to follow the QGIS Documentation and some other pages like here in order to install the QGIS, but to no avail. The console raises the following error:
$ sudo apt-get install qgis python-qgis qgis-plugin-grass
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-qgis is already the newest version (1:3.4.4+24xenial-ubuntugis-1).
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:
qgis-plugin-grass : Depends: grass760 but it is not installable
E: Unable to correct problems, you have held broken packages.
Then I tried the following this solution, but the console raises the following error:
$ sudo aptitude install qgis python-qgis qgis-plugin-grass
python-qgis is already installed at the requested version (1:3.4.4+24xenial-ubuntugis-1)
python-qgis is already installed at the requested version (1:3.4.4+24xenial-ubuntugis-1)
The following NEW packages will be installed:
libjs-leaflet{a} libqgis-app3.4.4{a} libqgisgrass7-3.4.4{a} qgis qgis-common{a} qgis-plugin-grass{b} qgis-plugin-grass-common{a} qgis-provider-grass{a}
qgis-providers{a} qgis-providers-common{a}
0 packages upgraded, 10 newly installed, 0 to remove and 1 not upgraded.
Need to get 38,2 MB of archives. After unpacking 130 MB will be used.
The following packages have unmet dependencies:
qgis-plugin-grass : Depends: grass760 which is a virtual package and is not provided by any available package.
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) qgis-plugin-grass [Not Installed]
Leave the following dependencies unresolved:
2) qgis recommends qgis-plugin-grass
Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:
Install the following packages:
1) libqgis-analysis3.4.6 [3.4.6+dfsg-1~xenial1 (xenial)]
2) libqgis-app3.4.6 [3.4.6+dfsg-1~xenial1 (xenial)]
3) libqgis-core3.4.6 [3.4.6+dfsg-1~xenial1 (xenial)]
4) libqgis-gui3.4.6 [3.4.6+dfsg-1~xenial1 (xenial)]
5) libqgis-native3.4.6 [3.4.6+dfsg-1~xenial1 (xenial)]
6) libqgis-server3.4.6 [3.4.6+dfsg-1~xenial1 (xenial)]
7) libqgisgrass7-3.4.6 [3.4.6+dfsg-1~xenial1 (xenial)]
8) libqgispython3.4.6 [3.4.6+dfsg-1~xenial1 (xenial)]
9) python3-qgis [3.4.6+dfsg-1~xenial1 (xenial)]
10) python3-qgis-common [3.4.6+dfsg-1~xenial1 (xenial)]
11) qgis [3.4.6+dfsg-1~xenial1 (xenial)]
12) qgis-common [3.4.6+dfsg-1~xenial1 (xenial)]
13) qgis-plugin-grass [3.4.6+dfsg-1~xenial1 (xenial)]
14) qgis-plugin-grass-common [3.4.6+dfsg-1~xenial1 (xenial)]
15) qgis-provider-grass [3.4.6+dfsg-1~xenial1 (xenial)]
16) qgis-providers [3.4.6+dfsg-1~xenial1 (xenial)]
17) qgis-providers-common [3.4.6+dfsg-1~xenial1 (xenial)]
Accept this solution? [Y/n/q/?] Y
The following NEW packages will be installed:
libjs-leaflet{a} libqgis-analysis3.4.6{a} libqgis-app3.4.6{a} libqgis-core3.4.6{a} libqgis-gui3.4.6{a} libqgis-native3.4.6{a} libqgis-server3.4.6{a}
libqgisgrass7-3.4.6{a} libqgispython3.4.6{a} python3-qgis{a} python3-qgis-common{a} qgis qgis-common{a} qgis-plugin-grass qgis-plugin-grass-common{a}
qgis-provider-grass{a} qgis-providers{a} qgis-providers-common{a}
0 packages upgraded, 18 newly installed, 0 to remove and 1 not upgraded.
Need to get 70,6 MB of archives. After unpacking 236 MB will be used.
Do you want to continue? [Y/n/?] y
[...]
Preparing to unpack .../python3-qgis-common_3.4.6+dfsg-1~xenial1_all.deb ...
Unpacking python3-qgis-common (3.4.6+dfsg-1~xenial1) ...
dpkg: error processing archive /var/cache/apt/archives/python3-qgis-common_3.4.6+dfsg-1~xenial1_all.deb (--unpack):
trying to overwrite '/usr/lib/python3/dist-packages/PyQt5/uic/widget-plugins/qgis_customwidgets.py', which is also in package python-qgis-common 1:3.4.4+24xenial-ubuntugis-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Preparing to unpack .../python3-qgis_3.4.6+dfsg-1~xenial1_amd64.deb ...
Unpacking python3-qgis (3.4.6+dfsg-1~xenial1) ...
dpkg: error processing archive /var/cache/apt/archives/python3-qgis_3.4.6+dfsg-1~xenial1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/python3/dist-packages/qgis/__init__.py', which is also in package python-qgis 1:3.4.4+24xenial-ubuntugis-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
[...]
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1.1) ...
Errors were encountered while processing:
/var/cache/apt/archives/python3-qgis-common_3.4.6+dfsg-1~xenial1_all.deb
/var/cache/apt/archives/python3-qgis_3.4.6+dfsg-1~xenial1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to perform requested operation on package. Trying to recover:
dpkg: dependency problems prevent configuration of qgis:
qgis depends on python3-qgis (= 3.4.6+dfsg-1~xenial1); however:
Package python3-qgis is not installed.
dpkg: error processing package qgis (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of qgis-plugin-grass:
qgis-plugin-grass depends on qgis (= 3.4.6+dfsg-1~xenial1); however:
Package qgis is not configured yet.
dpkg: error processing package qgis-plugin-grass (--configure):
dependency problems - leaving unconfigured
[...]
Errors were encountered while processing:
qgis
qgis-plugin-grass
Current status: 1 (+1) broken.
And now on Ubuntu top menu shows the following error message: Error: BrokenCount > 0 and unmet dependencies
After that, I've tried to fix with this solution, but when I try to use the sudo apt-get install qgis python-qgis qgis-plugin-grass command again, the same error occurs, unfortunately (i.e. qgis-plugin-grass : Depends: grass760 but it is not installable).
Then, I tried to add the python3-qgis, but an error occurs as well:
$ sudo apt-get install python3-qgis
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libqgis-analysis3.4.6 libqgis-core3.4.6 libqgis-gui3.4.6 libqgis-native3.4.6 libqgis-server3.4.6 libqgispython3.4.6 python3-qgis-common
The following NEW packages will be installed:
libqgis-analysis3.4.6 libqgis-core3.4.6 libqgis-gui3.4.6 libqgis-native3.4.6 libqgis-server3.4.6 libqgispython3.4.6 python3-qgis python3-qgis-common
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 31,9 MB of archives.
After this operation, 105 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu xenial/main amd64 libqgis-core3.4.6 amd64 3.4.6+dfsg-1~xenial1 [6.071 kB]
Get:2 http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu xenial/main amd64 libqgis-analysis3.4.6 amd64 3.4.6+dfsg-1~xenial1 [2.620 kB]
[...]
Unpacking python3-qgis-common (3.4.6+dfsg-1~xenial1) ...
dpkg: error processing archive /var/cache/apt/archives/python3-qgis-common_3.4.6+dfsg-1~xenial1_all.deb (--unpack):
trying to overwrite '/usr/lib/python3/dist-packages/PyQt5/uic/widget-plugins/qgis_customwidgets.py', which is also in package python-qgis-common 1:3.4.4+24xenial-ubuntugis-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Preparing to unpack .../python3-qgis_3.4.6+dfsg-1~xenial1_amd64.deb ...
Unpacking python3-qgis (3.4.6+dfsg-1~xenial1) ...
dpkg: error processing archive /var/cache/apt/archives/python3-qgis_3.4.6+dfsg-1~xenial1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/python3/dist-packages/qgis/__init__.py', which is also in package python-qgis 1:3.4.4+24xenial-ubuntugis-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Errors were encountered while processing:
/var/cache/apt/archives/python3-qgis-common_3.4.6+dfsg-1~xenial1_all.deb
/var/cache/apt/archives/python3-qgis_3.4.6+dfsg-1~xenial1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Even with these errors, the QGIS was "installed", but I'm afraid that according to the above error, this installation may have a problem in the future.
Would anyone know what could be happening? And what could I do to fix it?
Thank you in advance.
EDIT 1:
When I tried to install just the qgis-plugin-grass package, I've figured out that this package was raising the error.
$ sudo apt-get install qgis-plugin-grass
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:
qgis-plugin-grass : Depends: grass760 but it is not installable
E: Unable to correct problems, you have held broken packages.
This worked for me on Ubuntu 18:
sudo apt install aptitude
sudo aptitude install qgis qgis-plugin-grass
Iv'e gotten lots of help from stackoverflow but I'm stumped and this is my first post. I'm trying to install OverGrive from a .deb file and keep hitting a wall with a "/usr/local/bin/python2: No module named pip" on the installation. I'm fairly certain I've met all of the dependencies and have uninstalled and reinstalled pip both directly and through my package manager several times. There is obviously some kind of path/registry type problem but I can't resolve it. Scale of 10, my experience is 4. Thanks!
pi#raspberrypi:~/Downloads $ sudo dpkg -i overgrive_3.2.3_all.deb
(Reading database ... 136303 files and directories currently installed.)
Preparing to unpack overgrive_3.2.3_all.deb ...
/var/lib/dpkg/info/overgrive.prerm: line 5: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Unpacking overgrive (3.2.3) over (3.2.3) ...
Setting up overgrive (3.2.3) ...
/usr/local/bin/python2: No module named pip
dpkg: error processing package overgrive (--install):
subprocess installed post-installation script returned error exit status 1
Processing triggers for desktop-file-utils (0.22-1) ...
Processing triggers for mime-support (3.58) ...
Processing triggers for libglib2.0-0:armhf (2.42.1-1) ...
Errors were encountered while processing:
overgrive
pi#raspberrypi:~/Downloads $ pip -V
pip 9.0.1 from /usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg (python 2.7)
I'm having Python 2.x problems on Ubuntu 15.04. I wanted to completely uninstall and reinstall Python. I can't uninstall Python because mercurial-common depends on it. I try to remove that and I get an error:
➜ ~ sudo apt-get remove --purge mercurial-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gnome-control-center-data gnome-icon-theme gnome-icon-theme-symbolic gnome-settings-daemon libcolord-gtk1 libexpat1-dev libgoa-backend-1.0-1 libjs-excanvas libpython3-dev
libpython3.4-dev python3-colorama python3-dev python3-distlib python3-wheel python3.4-dev
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
mercurial-common*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 8,610 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 206144 files and directories currently installed.)
Removing mercurial-common (3.1.2-2+deb8u1build0.15.04.2) ...
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
dpkg: error processing package mercurial-common (--purge):
subprocess installed pre-removal script returned error exit status 1
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
mercurial-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
The mercurial-common removal scripts use python
/var/lib/dpkg/info/mercurial-common.prerm
If you type which pyclean I assume it exists.
However I suspect you python problems prevent it working. (you could try running it manually to verify this)
Unfortunately pyclean is in package python-minimal so you prolly can't uninstall this before mercurial-common.
you could try just removing it manually by:
sudo mv /usr/bin/pyclean /usr/bin/pyclean.backup
(Just remember to put it back).
Alternatively rather than completely removing python you could try just reinstalling python package .deb over the top of the existing install using dpkg --install