28

I am working in node js. I have installed hummus package. It installed properly. I am using this package for modifying the pdf files. While downloading the pdf I am calling hummus. Onclick of download I am getting this error.

Error: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /var/www/html/node_modules/hummus/binding/hummus.node)
    at Object.Module._extensions..node (module.js:681:18)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/var/www/html/node_modules/hummus/hummus.js:5:31)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at /var/www/html/app/routes.js:2250:18
    at Layer.handle [as handle_request] (/var/www/html/node_modules/express/lib/router/layer.js:95:5)

With the help of this link I have updated glibc. But still I am getting the same error. Please help me to find out the issue. I am using CentOs 6.9

user1187
  • 1,940
  • 8
  • 32
  • 64

4 Answers4

39

You need to install glibc alongside your current installation of glibc as you cannot update to glibc 2.14 directly in centos 6.x safely. Follow the steps below to install glibc 2.14:

  1. mkdir ~/glibc214
  2. cd ~/glibc214
  3. wget http://ftp.gnu.org/gnu/glibc/glibc-2.14.tar.gz
  4. tar zxvf glibc-2.14.tar.gz
  5. cd glibc-2.14
  6. mkdir build
  7. cd build
  8. ../configure --prefix=/opt/glibc-2.14
  9. make -j4
  10. sudo make install
  11. export LD_LIBRARY_PATH=/opt/glibc-2.14/lib (for current login session) OR add LD_LIBRARY_PATH=/opt/glibc-2.14/lib in the /etc/environment and perform source /etc/environment(to add env variable permanently)
Abhishek Singh
  • 2,482
  • 14
  • 24
  • 5
    at ```sudo make install``` , `Can't open configuration file /opt/glibc-2.14/etc/ld.so.conf: ` – xrs Feb 04 '19 at 13:19
  • 1
    at ../configure --prefix=/opt/glibc-2.14 i got configure: error: in `/root/glibc214/glibc-2.14/build': configure: error: no acceptable C compiler found in $PATH – Bharti Ladumor Feb 21 '19 at 07:14
  • @BhartiLadumor Refer this link for more info:https://stackoverflow.com/questions/19816275/no-acceptable-c-compiler-found-in-path-when-installing-python – Abhishek Singh Feb 21 '19 at 08:02
  • Setting `LD_LIBRARY_PATH` doesn't generally work, for reasons explained here: https://stackoverflow.com/a/8658468/50617 – Employed Russian Jul 17 '20 at 03:34
  • 1
    To fix: `glibc-2.14/build/elf/ldconfig: Can't open configuration file glibc-2.14/etc/ld.so.conf: No such file or directory` I did: `cd glibc-2.14/etc/`, `sh -c "echo 'glibc-2.14/lib' >> ld.so.conf"` – Beginner Jul 23 '20 at 12:50
  • oh my ... everything going well but ... [a@a build]$ ../configure --prefix=/opt/glibc-2.33 checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking for gcc... no checking for cc... no checking for cl.exe... no configure: error: in `/home/alex-chama/glibc233/glibc-2.33/build': configure: error: no acceptable C compiler found in $PATH See `config.log' for more details [a@a build]$ make -j4 bash: make: orden no encontrada Im in arhclinux I think was the same – alex-chama Apr 08 '21 at 23:18
3

line 8. ../configure --prefix=/opt/glibc-2.14 was erroring out for me

In the end I had to use the following

../configure --prefix=/opt/glibc-2.14  libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes
cachique
  • 1,034
  • 1
  • 10
  • 15
3

8th line in first answer became

../glibc-2.14/configure --prefix=$HOME/.local

then we do not need the "sudo" in 10th line

make install 

is enough

u might need to

touch $HOME/.local/etc/ld.so.conf

line 11 becomes;

export LD_LIBRARY_PATH="$HOME/.local/lib"    

in .bash_profile of el6

thanks&regards

1

Ok, I can not reproduce this error. However, this could work:

  1. Download the whole hummusjs package from the author https://github.com/galkahana/HummusJS (e. g. as zip).

  2. Add a new scripts entry in its package.json: "rebuild": "node-pre-gyp rebuild".

  3. cd into the package folder at your desktop and run "npm install".

  4. For safety delete the .binding and .build folder.

  5. Edit the binding.gyp file in the package (new section before 'sources'):

            ],
    #added by 11AND2
    "conditions": [
    [ 'OS=="linux"',
    {
        "cflags": ["-include gcc-preinclude.h"]
    }
    ]],
    #end added by 11AND2
       'sources': [
    
  6. Then run npm run rebuild and wait :-)

  7. Try the example which failed and report back. You can also execute npm run test to run the module test cases.

11AND2
  • 947
  • 6
  • 10