Please search your question on previous issues, stackoverflow or other search engines before you open a new one.
For bugs and unexpected issues, please provide following information, so that we could reproduce on our system.
Operating System:CentOS release 6.3 (Final)
CPU:Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz
C++/Python/R version:C++
GCC:4.8.2
OSError: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./lib_lightgbm.so)
1.
2.
3.
Hi, guolinke,
Thanks for sharing your code, I came into some trouble using lib_lightgbm.so in python calling c_api. In the Installation guide, it needs glibc >=2.14銆侭ut my server cannot using it cause it cannot connect to the internet. How can I rebuild the lib_lightgbm.so by staticly linking libstdc++ instead of installing glibc2.14?
@MenglaiWang How do you install LightGBM ? by pip install lightgbm ?
I think you need to compile the cpp code in your machine, by using pip install --no-binary :all: lightgbm
I compile the C++ code , and in the root dir, there is a lib_lightgbm.so.
I try to use the .so , and then got the error
The .so file is compiled by the machine you are running with ?
Yes, so I don't know why I cant use the .so file
@MenglaiWang
It is a very strange thing that you can compile it but cannot run it.
You can try to add following after this line: https://github.com/Microsoft/LightGBM/blob/master/CMakeLists.txt#L57
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
However, -stdlib=libc++ seems is enabled by default. And it seems the libc++ rely on the glibc, not sure can it works or not.
OK锛孖 will try It馃榿
it's a glib issue, please upgrade your GCC.
you can refer to :https://github.com/Microsoft/CNTK/issues/729
I recompile my python by gcc 4.8.2, and I can use it now.
Sorry, but I'm confused. How to recompile python code. I met exactly the same problem as yours.
@HuaGuo1992 Try this
Most helpful comment
I recompile my python by gcc 4.8.2, and I can use it now.