我想做的是:
我想开始学习Scala,按照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
得到的错误:
% 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和LDD
操作系统(Windows双启动):Ubuntu 20.04.5 LTS
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 (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)
我尝试过的事情:
sudo apt --fix-broken install
给我
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
给我
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.
最后,我从https://launchpad.net/ubuntu/groovy/amd64/libc6/2.32-0ubuntu2下载了deb。当我运行sudo dpkg -i libc6_2.32-0ubuntu2_amd64.deb
时,我得到:
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
否则,如果我试图强制它,即。sudo dpkg --force-all i libc6_2.32-0ubuntu2_amd64.deb
,我得到:
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' !
您可以尝试静态编译版本的cs:
https://github.com/coursier/launchers/raw/master/cs-x86_64-pc-linux-static.gz
至少在我的设置中,这是有效的。