No way to update python3.10 on my linux mint mate 20.3 Una - linux-mint

Last night the update manager indicates there are 2 update ready. I want to apply them but at the end only one updates the 2nd one (python 3.10) does not. It was late so went to bed. This morning that update is still there but now there is some more stuff.
Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease' doesn't support architecture 'i386'
It was not exactly the same as mine related to codelite. I looked in repositories and ppa´s and found an entry for codelite and disabled it. That message was gone. But the update still did not work. This time a problem with the mirror I was using. Changed mirror and all the rest runs fine. Still updating python 3.10 no way. Other updates do pass, even python 3.8 and 3.9. Clearly the problem lies with python 3.10 and seem dependency related but I am stumped.
The deadsnakes repository is there. I removed and reinstalled it. Still same problem.
Here is a screen shoot of my terminal (same messages appear when I use synaptic):
It all turn around two dependencies that python 3.10 needs but are no longer there. But the recommended commands do nothing but return the same result.
The following packages have unmet dependencies.
python3.10 : Depends: libpython3.10-stdlib (= 3.10.4-1+focal2) but 3.10.4-1+focal1 is installed
python3.10-minimal : Depends: libpython3.10-minimal (= 3.10.4-1+focal2) but 3.10.4-1+focal1 is installed
So what is going wrong? what apart from focal1 and focal2 is different? And are they fundamentally different? Most importantly how do I solve this problem without going in circles.
Oh and before I forget. My python console in gedit stopped working at the same time as these problems started and I can't make out what the problem there is either. Suspect though they are related. e
Thank you in advance.

Here is how I solved the same issue in Ubuntu 20.04
Locate package libpython3.10-stdlib
$ apt-cache policy libpython3.10-stdlib
libpython3.10-stdlib:
Installed: 3.10.4-1+focal1
Candidate: 3.10.4-1+focal2
Version table:
3.10.4-1+focal2 500
500 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal/main amd64 Packages
*** 3.10.4-1+focal1 100
100 /var/lib/dpkg/status
$ ls -l /var/lib/dpkg/info | grep -i libpython3.10-stdlib
-rw-r--r-- 1 root root 14489 Apr 10 00:26 libpython3.10- stdlib:amd64.list
-rw-r--r-- 1 root root 23536 Mär 24 17:12 libpython3.10-stdlib:amd64.md5sums
-rwxr-xr-x 1 root root 1161 Mär 24 17:12 libpython3.10-stdlib:amd64.prerm
Remove manually the package
$ sudo mv /var/lib/dpkg/info/libpython3.10-stdlib:amd64.* /tmp
Repeat the same steps for libpython3.10-minimal. Then fix the broken packages
$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libpython3.10-minimal libpython3.10-stdlib
The following packages will be upgraded:
libpython3.10-minimal libpython3.10-stdlib
2 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
5 not fully installed or removed.
Need to get 0 B/2.566 kB of archives.
After this operation, 68,6 kB disk space will be freed.
Do you want to continue? [Y/n]
dpkg: warning: files list file for package 'libpython3.10-stdlib:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libpython3.10-minimal:amd64' missing; assuming package has no files currently installed
(Reading database ... 191581 files and directories currently installed.)
Preparing to unpack .../libpython3.10-stdlib_3.10.4-1+focal2_amd64.deb ...
Unpacking libpython3.10-stdlib:amd64 (3.10.4-1+focal2) over (3.10.4-1+focal1) ...
Preparing to unpack .../libpython3.10-minimal_3.10.4-1+focal2_amd64.deb ...
Unpacking libpython3.10-minimal:amd64 (3.10.4-1+focal2) over (3.10.4-1+focal1) ...
Setting up libpython3.10-minimal:amd64 (3.10.4-1+focal2) ...
Setting up python3.10-minimal (3.10.4-1+focal2) ...
Setting up libpython3.10-stdlib:amd64 (3.10.4-1+focal2) ...
Setting up libpython3.10:amd64 (3.10.4-1+focal2) ...
Setting up python3.10 (3.10.4-1+focal2) ...
Setting up libpython3.10-dev:amd64 (3.10.4-1+focal2) ...
Setting up python3.10-dev (3.10.4-1+focal2) ...

I had the same error. I followed the instructions in the first and second answer and I got this:
/var/cache/apt/archives/libpython3.10-stdlib_3.10.4-1+focal2_amd64.debE: Sub-process /usr/bin/dpkg returned an error code (1)
After move this :
sudo mv /var/cache/apt/archives/libpython3.10-stdlib_3.10.4-1+focal2_amd64.deb /tmp
It works !

Same thing happened to me. When apt fails I go for https://pkgs.org/, search the package, download and install manually. It usually works.

Related

dpkg: why does instdir need admindir parameter on Mint 21

We create a Debian package of our application using CPack which can be installed on Linux Mint 19 like this:
$ sudo dpkg -i --instdir=/opt myapp.deb
With Linux Mint 21 the (installed) dependencies are not resolved:
dpkg: dependency problems prevent configuration of myapp:
myapp depends on libsqlite3-0 however:
Package libsqlite3-0 is not installed.
...
After reading the dpkg man page I set the admindir parameter and the installation succeeds:
$ sudo dpkg -i --instdir=/opt --admindir=/var/lib/dpkg/ myapp.deb
If I do not set admindir to /var/lib/dpkg/ then the right environment is not found. Why is that? And why did it work without admindir on Mint 19? Using parameter root does not help because it expects the administrative directory to be a subdirectory of the instdir.
This is a bug, which seems I introduced in dpkg 1.21.0. I'll be preparing a fix and regression tests for dpkg 1.21.10 which should hit Debian unstable in few days I guess. For Mint, which seems to be based on Ubuntu, you'd need to request the Ubuntu people to consider including that fix once it's in Debian unstable, and then the Mint people to do the same. Otherwise you can specify both options as a workaround for now. :/
Please feel free to report this kind of problems upstream in the bug tracking system next time, I just happened to see this by accident today. :)

CentOS Stream 8 - DNF Broken - Unable to Run Update/Upgrade

I thought I successfully upgraded from CentOS8 to Centos Stream 8, however I was never able to get dnf distro-sync to work. Now DNF appears to be broken and dnf upgrade throws unsatisfied dependencies for libsmartcols.so.1 in relation to DNF itself.
dnf distro-sync:
When running the sync, the following appears:
Error:
Problem: The operation would result in removing the following protected packages: setup
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
I tried every possible combination of --skip-broken, --nobest --allowerasing, etc. to resolve. Tried using the vault versions, no difference. All of the old CentOS repos were removed, so the only repos in the /etc/yum.repos.d/ folder are -Stream-. I do not have any EPEL repos installed at this time.
cat /etc/centos-release => CentOS Stream release 8
The server survives reboots and seems to work correctly for everything else.
When running dnf -y upgrade -v, the following results:
dnf -y upgrade -v
Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, groups-manager, needs-restarting, playground, repoclosure, repodiff, repograph, repomanage, reposync
DNF version: 4.7.0
cachedir: /var/cache/dnf
User-Agent: constructed: 'libdnf (CentOS Stream 8; generic; Linux.x86_64)'
repo: using cache for: appstream
appstream: using metadata from Tue 08 Feb 2022 07:27:22 PM EST.
repo: using cache for: baseos
baseos: using metadata from Tue 08 Feb 2022 07:26:22 PM EST.
repo: using cache for: extras
extras: using metadata from Tue 08 Feb 2022 04:08:34 PM EST.
Last metadata expiration check: 0:26:35 ago on Thu 10 Feb 2022 12:44:57 PM EST.
--> Starting dependency resolution
---> Package dnf-plugins-core.noarch 4.0.21-8.el8 will be upgraded
---> Package dnf-plugins-core.noarch 4.0.21-10.el8 will be an upgrade
---> Package libdnf.x86_64 0.63.0-5.el8 will be upgraded
---> Package libdnf.x86_64 0.63.0-7.el8 will be an upgrade
---> Package python3-dnf-plugins-core.noarch 4.0.21-8.el8 will be upgraded
---> Package python3-dnf-plugins-core.noarch 4.0.21-10.el8 will be an upgrade
---> Package python3-hawkey.x86_64 0.63.0-5.el8 will be upgraded
---> Package python3-hawkey.x86_64 0.63.0-7.el8 will be an upgrade
---> Package python3-libdnf.x86_64 0.63.0-5.el8 will be upgraded
---> Package python3-libdnf.x86_64 0.63.0-7.el8 will be an upgrade
--> Finished dependency resolution
Dependencies resolved.
==============================================================================================================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================================================================================================
Upgrading:
dnf-plugins-core noarch 4.0.21-10.el8 baseos 71 k
libdnf x86_64 0.63.0-7.el8 baseos 701 k
python3-dnf-plugins-core noarch 4.0.21-10.el8 baseos 230 k
python3-hawkey x86_64 0.63.0-7.el8 baseos 116 k
python3-libdnf x86_64 0.63.0-7.el8 baseos 778 k
Transaction Summary
==============================================================================================================================================================================================================
Upgrade 5 Packages
Total size: 1.9 M
Downloading Packages:
[SKIPPED] dnf-plugins-core-4.0.21-10.el8.noarch.rpm: Already downloaded
[SKIPPED] libdnf-0.63.0-7.el8.x86_64.rpm: Already downloaded
[SKIPPED] python3-dnf-plugins-core-4.0.21-10.el8.noarch.rpm: Already downloaded
[SKIPPED] python3-hawkey-0.63.0-7.el8.x86_64.rpm: Already downloaded
[SKIPPED] python3-libdnf-0.63.0-7.el8.x86_64.rpm: Already downloaded
Using rpmkeys executable at /usr/bin/rpmkeys to verify signatures
Running transaction check
Error: transaction check vs depsolve:
libsmartcols.so.1()(64bit) is needed by libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.25)(64bit) is needed by libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.28)(64bit) is needed by libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.29)(64bit) is needed by libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.30)(64bit) is needed by libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1()(64bit) is needed by python3-hawkey-0.63.0-7.el8.x86_64
libsmartcols.so.1()(64bit) is needed by python3-libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.25)(64bit) is needed by python3-libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.27)(64bit) is needed by python3-libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.28)(64bit) is needed by python3-libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.29)(64bit) is needed by python3-libdnf-0.63.0-7.el8.x86_64
libsmartcols.so.1(SMARTCOLS_2.30)(64bit) is needed by python3-libdnf-0.63.0-7.el8.x86_64
To diagnose the problem, try running: 'rpm -Va --nofiles --nodigest'.
You probably have corrupted RPMDB, running 'rpm --rebuilddb' might fix the issue.
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
I have tried cleaning the packages (dnf clean all), removing the cache files, individually trying to update/upgrade each package, etc.. I'm out of ideas.
Any suggestions?
Afer a couple more hours of trying, I was able to resolve it by performing the following:
Copy a CentOS-Base.repo file from another server
Edit the repo file to reflect the vault.centos.org location, turn off gpgcheck
dnf clean all
dnf install libsmartcols-2.32.1-28.el8
Ran dnf -y upgrade again and it worked. Go figure.
Hopefully, this will help someone else with the same or similar issue.

Installing MXNet framework. on Raspberry Pi - SciPy hanging

I'm attempting to setup AWS Greengrass with mxnet for Machine Learning on a Raspberry Pi.
When running ./mxnet_installer.sh from https://docs.aws.amazon.com/greengrass/latest/developerguide/ml-console.html#install-mxnet it takes ages and just disconnects my session with PuTTY.
It seems to be hanging on Running setup.py bdist_wheel for scipy - it sits there for about 2 hours before the PuTTY session is lost.
I'm executing the command on a clean PI, all all that has been done beforehand is modules 1 to 6 from https://docs.aws.amazon.com/greengrass/latest/developerguide/gg-gs.html
login as: pi
pi#192.168.0.49's password:
Linux raspberrypi 4.14.70-v7+ #1144 SMP Tue Sep 18 17:34:46 BST 2018 armv7l
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Oct 2 14:53:14 2018 from 192.168.0.13
SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.
pi#raspberrypi:~ $ ls
aws-greengrass-samples ggc-mxnet-v1.2.1-python-raspi.tar.gz
ggc-mxnet-v1.2.1-python-raspi
pi#raspberrypi:~ $ cd ggc-mxnet-v1.2.1-python-raspi/
pi#raspberrypi:~/ggc-mxnet-v1.2.1-python-raspi $ ls
greengrass-ml-squeezenet-object-classification-raspi-python.tar.gz
mxnet-1.2.1-py2.py3-none-any.whl
mxnet_examples.tar.gz
mxnet_installer.sh
mxnet-python-unit-test.tar.gz
pi#raspberrypi:~/ggc-mxnet-v1.2.1-python-raspi $ ./mxnet_installer.sh
Starting MXNET installation on the system...
Unittests: N
Swapfile location: /var/swap
Swapfile size: 1 GB
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
python-numpy-dbg python-numpy-doc
The following NEW packages will be installed:
python-numpy
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/1,694 kB of archives.
After this operation, 9,532 kB of additional disk space will be used.
Selecting previously unselected package python-numpy.
(Reading database ... 43734 files and directories currently installed.)
Preparing to unpack .../python-numpy_1%3a1.12.1-3_armhf.deb ...
Unpacking python-numpy (1:1.12.1-3) ...
Setting up python-numpy (1:1.12.1-3) ...
Processing triggers for man-db (2.7.6.1-2) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
liblapack3 is already the newest version (3.7.0-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
libopenblas-dev is already the newest version (0.2.19-3+rpi1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
liblapack-dev is already the newest version (3.7.0-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-dev is already the newest version (2.7.13-2).
python-nose is already the newest version (1.3.7-2).
python-pip is already the newest version (9.0.1-2+rpt2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-opencv is already the newest version (2.4.9.1+dfsg1-2).
zip is already the newest version (3.0-11).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
dpkg: python-numpy: dependency problems, but removing anyway as you requested:
python-opencv depends on python-numpy-abi9; however:
Package python-numpy-abi9 is not installed.
Package python-numpy which provides python-numpy-abi9 is to be removed.
python-opencv depends on python-numpy (>= 1:1.6.1); however:
Package python-numpy is to be removed.
python-picamera depends on python-numpy.
python-opencv depends on python-numpy-abi9; however:
Package python-numpy-abi9 is not installed.
Package python-numpy which provides python-numpy-abi9 is to be removed.
python-opencv depends on python-numpy (>= 1:1.6.1); however:
Package python-numpy is to be removed.
(Reading database ... 44120 files and directories currently installed.)
Removing python-numpy (1:1.12.1-3) ...
Processing triggers for man-db (2.7.6.1-2) ...
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages (18.0)
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: wheel in /usr/lib/python2.7/dist-packages (0.29.0)
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already up-to-date: picamera in /usr/lib/python2.7/dist-packages (1.13)
Checking numpy...
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already up-to-date: numpy in /usr/local/lib/python2.7/dist-packages (1.15.2)
'numpy' check complete!
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting scipy
Using cached https://files.pythonhosted.org/packages/07/76/7e844757b9f3bf5ab9f951ccd3e4a8eed91ab8720b0aac8c2adcc2fdae9f/scipy-1.1.0.tar.gz
Building wheels for collected packages: scipy
Running setup.py bdist_wheel for scipy ... |
Any suggestions?
Increase swap space.
Install SciPy manually. Build from sources. See
this answer
Run mxnet_installer

Yum error on Centos 6.4

Yum suddenly start to give the error pasted bellow
I tried to rebuild yum, but the error remains. I re-installed krb5-libs, but the error remains
How can I repair yum without reinstating Centos?
Error:
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
/lib64/libkrb5.so.3: symbol krb5int_push_fscreatecon_for, version krb5support_0_MIT not defined in file libkrb5support.so.0 with link time reference
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.6.6 (r266:84292, Jul 10 2013, 22:48:45)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
At my machine the issue was caused by a second libkrb5support.so distributed with PostgreSQL 5.2 / PSqlODBC. After commenting the library path in /etc/ld.so.conf.d/psqlODBC.conf and runing ldconfig -v, I can run yum again without any issue.
In my case, the path to the "wrong" library is /opt/PostgreSQL/9.2/lib/libkrb5support.so.0
Edgar.
I encountered this error after defining LD_LIBRARY_PATH environment variable. It was fixed by adding /lib and /lib64 to LD_LIBRARY_PATH.
export LD_LIBRARY_PATH=/lib:/lib64:....
Run the below command to test what all the libraries you have:
# ldd /lib64/libkrb5.so.3
And make sure that the module 'libkrb5support.so.0' is available under '/lib64' directory or having the soft ink to the files that is inside /lib64 directory. If its not there then this error is expected. So manually you have to link it again.
From my test system:
# locate libkrb5support.so.0
/lib64/libkrb5support.so.0
# ls -l /lib64/libkrb5support.so.0
lrwxrwxrwx. 1 root root 21 Aug 19 15:52 /lib64/libkrb5support.so.0 -> libkrb5support.so.0.1
# ls -l /lib64/libkrb5support.so.0.1
-rwxr-xr-x. 1 root root 46336 May 1 2012 /lib64/libkrb5support.so.0.1

Debian aptitude install: 'find' not found in PATH or not executable

When I try to install any package such as php5, it gives me this error.
I did update and upgrade all libraries.
root#host:~# apt-get install apache2-mpm-prefork libapache2-mod-php5
Reading package lists... Done
Building dependency tree
Reading state information... Done
apache2-mpm-prefork is already the newest version.
The following extra packages will be installed:
libonig2 libqdbm14 php5-cli php5-common
Suggested packages:
php-pear
The following NEW packages will be installed:
libapache2-mod-php5 libonig2 libqdbm14 php5-cli php5-common
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/6,106 kB of archives.
After this operation, 18.7 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
debconf: delaying package configuration, since apt-utils is not installed
dpkg: warning: 'find' not found in PATH or not executable
dpkg: error: 1 expected program not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
E: Sub-process /usr/bin/dpkg returned an error code (2)
Can someone help me?
There is probably something messed up with the permissions of find, find on your installation is probably located in /usr/bin/find, to check the permissions of this application run
ls -l /usr/bin/find
This should return something like this:
-rwxr-xr-x 1 root root 136152 Oct 26 2010 /usr/bin/find
If this returns an error, try to ls find on other locations in you path (eg. /bin/find, /usr/local/sbin/find)
The first part should be identical for the command to work. If not, reset the permissions to with the following command:
chmod 755 /usr/bin/find
This should fix it.