在 CentOS 7 上将 glibc 2.17 升级到 2.19+

Upgrade glibc 2.17 to 2.19+ on CentOS 7

首先,Dropbox给我发邮件说我必须将glibc升级到2.19+,否则Dropbox不会run.Then我按照下面的步骤升级glibc

wget http://ftp.gnu.org/gnu/glibc/glibc-2.28.tar.gz
tar –zxvf glibc-2.28.tar.gz
cd glibc-2.28
mkdir build
cd build
../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin

然后遇到如下错误

...
checking version of sed... 4.2.2, ok
checking for gawk... gawk
checking version of gawk... 4.0.2, ok
checking for bison... bison
checking version of bison... 3.0.4, ok
checking if gcc -B/usr/bin/ is sufficient to build libc... no
checking for nm... nm
checking for python3... python3
configure: error:
*** These critical programs are missing or too old: make compiler
*** Check the INSTALL file for required versions.

请帮帮我。

看看this thread。这个问题有一个解决方法,基本上是通过欺骗 Dropbox 以为 glibc 版本是 2.19,而实际上是 2.17:

Create dropboxcheat.c with this code:

const char *gnu_get_libc_version (void) {
        return "2.19"; }

compile the cheat .so

gcc -Wall -fPIC -shared -o dropboxcheat.so dropboxcheat.c

move the .so to /usr/local/lib64/ add this line in dropbox.py, right before subprocess.Popen....., in function start_dropbox

os.environ['LD_PRELOAD'] = "/usr/local/lib64/dropboxcheat.so"

Run dropbox normally and it should ask to relogin.

此解决方案归功于 Pablo

我自己还没有尝试过,但计划下周初尝试。让我知道这是否可行。