1

I'm using amazon lambda CLI. Everything is up and correctly working and even ran hello_world scripts that functioned properly.

Now i'm running python packages and other files, everything was fine till I invoked my function:

Unable to import module 'handler': /usr/lib64/libstdc++.so.6: version
`GLIBCXX_3.4.20' not found
(required by /var/task/python_example2.cpython-36m-x86_64-linux-gnu.so)

So is the python_example2.cpython file not able to see where libstdc++.so.6 is?

I also ran the command: /sbin/ldconfig -p | grep stdc++

Output:

    libstdc++.so.6 (libc6,x86-64) => /usr/lib/libstdc++.so.6
    libstdc++.so.6 (libc6) => /usr/lib32/libstdc++.so.6
    libstdc++.so.5 (libc6) => /usr/lib32/libstdc++.so.5
    libstdc++.so (libc6,x86-64) => /usr/lib/libstdc++.so
    libstdc++.so (libc6) => /usr/lib32/libstdc++.so

Not sure what is going on. I went into the /usr/lib64/ and didn't see libstdc++.so.6. I have conda and pip3. But I don't have sudo permissions to install say sudo apt-get install libstdc++6.

Anyone can help me out? Thanks.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
tnet
  • 567
  • 2
  • 6
  • 14
  • Seems your version of `libstdc++.so.6` is version 4.4 or 4.8. GCC-4.9 supplies the libstdc++ object GLIBCXX_3.4.20 : `objdump -x libstdc++.so.6 | grep GLIBCXX_3.4.20` ... Get "libstdc++.so.6.0.20" from gcc49-c++-4.9.3-1.el6 https://stackoverflow.com/questions/47175706/how-to-install-gcc-4-9-2-on-rhel-7-4/47189915#47189915 – Knud Larsen May 19 '18 at 06:38
  • Separate package with only `libstdc++.so.6 -> libstdc++.so.6.0.20` → libstdc++6_4.9.3.tar.gz https://www.dropbox.com/s/sqnthesjacnmc3d/libstdc%2B%2B6_4.9.3.tar.gz?dl=0 ... Can be unpacked in $HOME. – Knud Larsen May 19 '18 at 06:48
  • @KnudLarsen I tried `objdump -x libstdc++.so.6 | grep GLIBCXX_3.4.20` but it said `objdump: 'libstdc++.so.6': No such file` – tnet May 21 '18 at 04:08
  • Please unpack libstdc++6_4.9.3 : `tar xvf libstdc++6_4.9.3.tar.gz` && `cd libstdc++6_4.9.3/` && `objdump -x libstdc++.so.6 | grep GLIBCXX_3.4.20` – Knud Larsen May 21 '18 at 07:19

0 Answers0