研发python开发引入pyTSL模块时报错,ImportError: /lib64/libc.so.6: version `GLIBC_2.25’ not found。因为操作系统当前的版本为GLIBC_2.17,需要将GLIBC进行升级。因为yum安装只能安装到2.17版本,所有只能采用源码升级的方式进行。环境说明:
注意,glibc版本升级可能导致操作系统无法使用,所以请务必谨慎操作,先在同版本操作系统系统模拟测试,将glibc新版本所依赖的软件完成升级后再行升级。博文实验的时候最初计划是升级到2.25版本,但是安装INSTALL文件完成相关依赖升级后编译安装glibc的时候还是各种报错。最后直接安装glibc2.31的安装要求升级了依赖软件并完成了glibc2.31版本的安装。
[root@s144 glibc-2.25]# ldd --version
ldd (GNU libc) 2.17
Copyright © 2012 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.
yum安装只能安装到2.17版本,而当前已经是2.17版本。

[root@s142 opt]# wget https://mirrors.aliyun.com/gnu/glibc/glibc-2.31.tar.gz
[root@s142 opt]# tar -zxvf glibc-2.31.tar.gz

通过查看INSTALL文件我们可以知道安装glibc2.25的要求,需要python版本2.7.6以上,gcc版本4.7以上,make版本3.79以上。
[root@s142 glibc-2.25]# cat INSTALL | grep -E “newer|later”
#检查tpyhon/gcc/make软件版本,可以看到操作系统centos7.6环境下python、gdb不满足要求。
[root@s144 opt]# cat /etc/centos-release
CentOS Linux release 7.6.1810 (Core)
[root@s144 opt]# python -V
Python 2.7.5
[root@s144 opt]# gcc -v
…
gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
[root@s144 opt]# make -v
GNU Make 3.82
…
[root@s144 opt]# gdb -v
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7
升级到2.31版本,没有遇到gdb的报错问题,可能是因为直接升级了python只3.4以上。如果升级到2.25会有要求gdb版本太老的报错,升级gdb见博文Linux之gdb安装和升级。
博主也进行了yum安装python尝试,发现只可以安装python-2.7.5-90.el7.x86_64版本,因为要求python3.4以后版本,所以采用源码安装方式。Linux之python版本升级
[root@s144 build]# python -V
Python 3.4.10
gcc升级步骤可以参考博文Linux之gcc源码安装步骤
#下载软件包
wget https://mirrors.aliyun.com/gnu/gcc/gcc-9.3.0/gcc-9.3.0.tar.gz
#解压依赖包
tar -zxf gcc-9.3.0.tar.gz
cd gcc-9.3.0/
#下载4个依赖包
./contrib/download_prerequisites
#预编译
mkdir build
cd build
…/configure --enable-checking=release --enable-language=c,c++ --disable-multilib --prefix=/usr
#查看cpu核数
cat /proc/cpuinfo| grep “processor”| wc -l
#-j4中的数字为cpu核数,及并发工作任务数量,可以提高编译效率
make -j4
#编译安装
make install
#检查gcc版本
[root@s144 build]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/9.3.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: …/configure --enable-checking=release --enable-language=c,c++ --disable-multilib --prefix=/usr
Thread model: posix
gcc version 9.3.0 (GCC)
[root@s144 opt]# wget https://mirrors.aliyun.com/gnu/make/make-4.3.tar.gz
[root@s144 opt]# tar -zxf make-4.3.tar.gz
[root@s144 opt]# cd make-4.3/
[root@s144 opt]# mkdir build
[root@s144 opt]# cd build
.[root@s144 opt]# ./configure --prefix=/usr
[root@s144 opt]#make
[root@s144 opt]#make install
…
[root@s144 build]# make -v
GNU Make 4.3
…
[root@s144 glibc-2.31]# cd build/
[root@s144 build]# …/configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin --disable-sanity-checks --disable-werror
…
configure: creating ./config.status
config.status: creating config.make
config.status: creating Makefile
config.status: creating config.h
config.status: executing default commands
[root@s144 build]# make -j4
…
make[2]: Leaving directory `/opt/glibc-2.25/elf’
make[1]: Leaving directory `/opt/glibc-2.31’
[root@s142 build]# make install
…
[root@s144 build]# make localedata/install-locales
make -r PARALLELMFLAGS=“” -C … objdir=`pwd` localedata/install-locales
make[1]: Entering directory ‘/opt/glibc-2.31’
…
zu_ZA.UTF-8… done
zu_ZA.ISO-8859-1… done
make[2]: Leaving directory ‘/opt/glibc-2.31/localedata’
make[1]: Leaving directory ‘/opt/glibc-2.31’

[root@s144 bin]# ldd --version
ldd (GNU libc) 2.31
Copyright © 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.
#查看glibc支持的版本
[root@s144 bin]# strings /lib64/libc.so.6 | grep GLIBC
[root@s144 glibc-2.31]# mkdir build
[root@s144 glibc-2.31]# cd build
[root@s144 build]# …/glibc-2.31/configure
尝试通过RVM将RubyGems升级到版本1.8.10并出现此错误:$rvmrubygemslatestRemovingoldRubygemsfiles...Installingrubygems-1.8.10forruby-1.9.2-p180...ERROR:Errorrunning'GEM_PATH="/Users/foo/.rvm/gems/ruby-1.9.2-p180:/Users/foo/.rvm/gems/ruby-1.9.2-p180@global:/Users/foo/.rvm/gems/ruby-1.9.2-p180:/Users/foo/.rvm/gems/rub
我在我的Rails项目中使用Pow和powifygem。现在我尝试升级我的ruby版本(从1.9.3到2.0.0,我使用RVM)当我切换ruby版本、安装所有gem依赖项时,我通过运行railss并访问localhost:3000确保该应用程序正常运行以前,我通过使用pow访问http://my_app.dev来浏览我的应用程序。升级后,由于错误Bundler::RubyVersionMismatch:YourRubyversionis1.9.3,butyourGemfilespecified2.0.0,此url不起作用我尝试过的:重新创建pow应用程序重启pow服务器更新战俘
我实际上是在尝试使用RVM在我的OSX10.7.5上更新ruby,并在输入以下命令后:rvminstallruby我得到了以下回复:Searchingforbinaryrubies,thismighttakesometime.Checkingrequirementsforosx.Installingrequirementsforosx.Updatingsystem.......Errorrunning'requirements_osx_brew_update_systemruby-2.0.0-p247',pleaseread/Users/username/.rvm/log/138121
我正在尝试修改当前依赖于定义为activeresource的gem:s.add_dependency"activeresource","~>3.0"为了让gem与Rails4一起工作,我需要扩展依赖关系以与activeresource的版本3或4一起工作。我不想简单地添加以下内容,因为它可能会在以后引起问题:s.add_dependency"activeresource",">=3.0"有没有办法指定可接受版本的列表?~>3.0还是~>4.0? 最佳答案 根据thedocumentation,如果你想要3到4之间的所有版本,你可以这
如果我使用ruby版本2.5.1和Rails版本2.3.18会怎样?我有基于rails2.3.18和ruby1.9.2p320构建的rails应用程序,我只想升级ruby的版本,而不是rails,这可能吗?我必须面对哪些挑战? 最佳答案 GitHub维护apublicfork它有针对旧Rails版本的分支,有各种变化,它们一直在运行。有一段时间,他们在较新的Ruby版本上运行较旧的Rails版本,而不是最初支持的版本,因此您可能会发现一些关于需要向后移植的有用提示。不过,他们现在已经有几年没有使用2.3了,所以充其量只能让更
我安装了ruby版本管理器,并将RVM安装的ruby实现设置为默认值,这样'哪个ruby'显示'~/.rvm/ruby-1.8.6-p383/bin/ruby'但是当我在emacs中打开inf-ruby缓冲区时,它使用安装在/usr/bin中的ruby。有没有办法让emacs像shell一样尊重ruby的路径?谢谢! 最佳答案 我创建了一个emacs扩展来将rvm集成到emacs中。如果您有兴趣,可以在这里获取:http://github.com/senny/rvm.el
我最近决定从我的系统中卸载RVM。在thispage提出的一些论点说服我:实际上,我的决定是,我根本不想担心Ruby的多个版本。我只想使用1.9.2-p290版本而不用担心其他任何事情。但是,当我在我的Mac上运行ruby--version时,它告诉我我的版本是1.8.7。我四处寻找如何简单地从我的Mac上卸载这个Ruby,但奇怪的是我没有找到任何东西。似乎唯一想卸载Ruby的人运行linux,而使用Mac的每个人都推荐RVM。如何从我的Mac上卸载Ruby1.8.7?我想升级到1.9.2-p290版本,并且我希望我的系统上只有一个版本。 最佳答案
有人知道在发布新版本的Ruby和Rails时收到电子邮件的方法吗?他们有邮件列表,RubyonRails有一个推特,但我不想听到那些随之而来的喧嚣,我只想知道什么时候发布新版本,尤其是那些有安全修复的版本。 最佳答案 从therailsblog获取提要.http://weblog.rubyonrails.org/feed/atom.xml 关于ruby-on-rails-如何在发布新的Ruby或Rails版本时收到通知?,我们在StackOverflow上找到一个类似的问题:
在应用开发中,有时候我们需要获取系统的设备信息,用于数据上报和行为分析。那在鸿蒙系统中,我们应该怎么去获取设备的系统信息呢,比如说获取手机的系统版本号、手机的制造商、手机型号等数据。1、获取方式这里分为两种情况,一种是设备信息的获取,一种是系统信息的获取。1.1、获取设备信息获取设备信息,鸿蒙的SDK包为我们提供了DeviceInfo类,通过该类的一些静态方法,可以获取设备信息,DeviceInfo类的包路径为:ohos.system.DeviceInfo.具体的方法如下:ModifierandTypeMethodDescriptionstatic StringgetAbiList()Obt
ValidPalindromeGivenastring,determineifitisapalindrome,consideringonlyalphanumericcharactersandignoringcases. [#125]Example:"Aman,aplan,acanal:Panama"isapalindrome."raceacar"isnotapalindrome.Haveyouconsiderthatthestringmightbeempty?Thisisagoodquestiontoaskduringaninterview.Forthepurposeofthisproblem