Wednesday, May 25, 2022

[SOLVED] Upgrade glibc 2.17 to 2.19+ on CentOS 7

Issue

First of all, Dropbox emailed me saying that I must upgrade glibc to 2.19+, otherwise Dropbox will not run.Then I follow the steps below to upgrade 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

Then I encountered the following error.

...
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.

Help me Please.


Solution

Take a look at this thread. There is a workaround for this problem, basically by cheating Dropbox to think that the glibc version is 2.19, when it is actually 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.

Credit to Pablo for this solution.

I haven't tried it myself yet, but plan on doing so early next week. Let me know if this works out.



Answered By - Shovalt
Answer Checked By - David Marino (WPSolving Volunteer)