Issues with "`GLIBC_2.32' and `GLIBC_2.34' not found" when Installing Coursier as per Scala 'getting Started' Official Instructions - scala

What I am trying to do:
I want to get started with Scala, as per https://docs.scala-lang.org/getting-started/index.html.
curl -fL https://github.com/coursier/launchers/raw/master/cs-x86_64-pc-linux.gz | gzip -d > cs && chmod +x cs && ./cs setup
The error I am getting:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 20.1M 100 20.1M 0 0 19.0M 0 0:00:01 0:00:01 --:--:-- 19.0M
./cs: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./cs)
./cs: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./cs)
OS, Java and LDD
Operating System (dual boot with Windows):
Ubuntu 20.04.5 LTS
Output of ldd --version:
ldd (Ubuntu GLIBC 2.31-0ubuntu9.9) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
JAVA (output of java --version)
openjdk 11.0.17 2022-10-18
OpenJDK Runtime Environment (build 11.0.17+8-post-Ubuntu-1ubuntu220.04)
OpenJDK 64-Bit Server VM (build 11.0.17+8-post-Ubuntu-1ubuntu220.04, mixed mode, sharing)
Things I have tried:
sudo apt --fix-broken install
gives me
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 75 not upgraded.
sudo apt install -y libc6 libc-bin
gives me
Reading package lists... Done
Building dependency tree
Reading state information... Done
libc-bin is already the newest version (2.31-0ubuntu9.9).
libc-bin set to manually installed.
libc6 is already the newest version (2.31-0ubuntu9.9).
0 upgraded, 0 newly installed, 0 to remove and 75 not upgraded.
Ultimately, I downloaded the deb from https://launchpad.net/ubuntu/groovy/amd64/libc6/2.32-0ubuntu2. When I run sudo dpkg -i libc6_2.32-0ubuntu2_amd64.deb I get:
dpkg: regarding libc6_2.32-0ubuntu2_amd64.deb containing libc6:amd64:
libc6:amd64 breaks locales (<< 2.32)
locales (version 2.31-0ubuntu9.9) is present and installed.
dpkg: error processing archive libc6_2.32-0ubuntu2_amd64.deb (--install):
installing libc6:amd64 would break locales, and
deconfiguration is not permitted (--auto-deconfigure might help)
Errors were encountered while processing:
libc6_2.32-0ubuntu2_amd64.deb
Otherwise, if I try to force it i.e.
sudo dpkg --force-all i libc6_2.32-0ubuntu2_amd64.deb, I get:
dpkg: error: need an action option
Type dpkg --help for help about installing and deinstalling packages [*];
Use 'apt' or 'aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;
Options marked [*] produce a lot of output - pipe it through 'less' or 'more' !

You may try the static compiled version of the cs:
https://github.com/coursier/launchers/raw/master/cs-x86_64-pc-linux-static.gz
At least in my setup this worked.

It's already an issue on their Github, which was closed 19 hours ago and will be fixed in the next release

Related

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

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.

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

Which missing library results in the message '/usr/bin/ld: cannot find -lglib-2.0'?

I am cross compiling a Lazarus program, creating a 32bit program on a 64bit Ubuntu 14.04 Trusty Tahr system, and everything apparently compiles to the very end when I get this messsage
/usr/bin/ld: cannot find -lglib-2.0
What is the full name of the library whose absence results in this error mesage?
libc6-dev:i386 appears to be the most likely library, but when I try to install it with apt indicates build-essential g++ gcc gcc-multilib will be removed so I abort it.
sudo apt-get install libc6-dev:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
linux-libc-dev linux-libc-dev:i386
Suggested packages:
glibc-doc:i386 manpages-dev:i386
Recommended packages:
gcc:i386 c-compiler:i386
The following packages will be REMOVED
build-essential g++ gcc gcc-multilib
The following NEW packages will be installed
libc6-dev:i386 linux-libc-dev:i386
The following packages will be upgraded:
linux-libc-dev
1 to upgrade, 2 to newly install, 4 to remove and 18 not to upgrade.
Need to get 3,126 kB of archives.
After this operation, 12.6 MB of additional disk space will be used.
Do you want to continue? [Y/n]
It turns out it was the libglib2.0-0:i386 package. It was already installed earlier, but it had not been fully configured.
It was present in the /lib/i386-linux directory and I had to create a symlink to it include it to the fpc.cfg configuration file used by Free Pascal.
locate libglib | grep ^/lib produced:
/lib/i386-linux-gnu/libglib-2.0.so.0
/lib/i386-linux-gnu/libglib-2.0.so.0.4002.0
/lib/x86_64-linux-gnu/libglib-2.0.so.0
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0
I symlinked it with the expected name:
ln -s /lib/i386-linux-gnu/libglib-2.0.so.0 /lib/i386-linux-gnu/libglib-2.0.so
then added to the Lazarus installations fpc.cfg file
#ifdef cpui386
-Fl/usr/lib32
-Fl/lib/i386-linux-gnu
#endif

SBT install failure with aptitude on Ubuntu 14.04

I receive several errors when I attempt to install sbt on Ubuntu via aptitude with the instructions from the scala-sbt homepage:
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-get update
sudo apt-get install sbt
http://www.scala-sbt.org/0.13/tutorial/Installing-sbt-on-Linux.html
First I get a package validation error and then a segmentation fault.
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
sbt
0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
Need to get 1,041 kB of archives.
After this operation, 1,224 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
sbt
Install these packages without verification? [y/N] y
E: Method https has died unexpectedly!
E: Sub-process https received a segmentation fault.
EDIT:
I can browse the mirror fine without any cert errors.
Confirming which mirror it's using with apt-cache.
$ sudo apt-cache policy sbt
sbt:
Installed: (none)
Candidate: 0.13.7
Version table:
0.13.7 0
500 https://dl.bintray.com/sbt/debian/ Packages
0.13.6 0
500 https://dl.bintray.com/sbt/debian/ Packages
0.13.5 0
500 https://dl.bintray.com/sbt/debian/ Packages
0.13.2 0
500 https://dl.bintray.com/sbt/debian/ Packages
0.13.1-0.1-build-001 0
500 https://dl.bintray.com/sbt/debian/ Packages
0.13.0-0.1-build-001 0
500 https://dl.bintray.com/sbt/debian/ Packages
0.12.4-0.1-build-001 0
500 https://dl.bintray.com/sbt/debian/ Packages
EDIT 2: I ended up just downloading the package manually and installing it with dpkg.
There are related answers which lead me to this solution:
wget https://dl.bintray.com/sbt/debian/sbt-0.13.7.deb
sudo dpkg -i sbt-0.13.7.deb
P.S. I think that officially documented way does not work because they didn't provide the public key used by apt to authenticate packages.
P.P.S. After some research I've found that this issue is more related to the apt package, there are many reports about this error at bugs.launchpad.net. So, while it's still an issue that sbt didn't provide public key, but it shouldn't cause this error. I hope canonical will resolve this soon.
Related:
Install sbt on ubuntu [closed]
Install Java Scala and SBT on Debian (useless pain in the ass)
Manual install is also available:
http://www.scala-sbt.org/0.13/tutorial/Manual-Installation.html
Also, as a temporary workaround, you could use HTTP repository address instead of HTTPS.
Just open file /etc/apt/sources.list.d/sbt.list and replace
deb https://dl.bintray.com/sbt/debian /
with
deb http://dl.bintray.com/sbt/debian /

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.