xgboost: import xgboost OSError:version `GOMP_4.0' not found
For bugs or installation issues, please provide the following information. The more information you provide, the more easily we will be able to offer help and advice.
Environment info
compiled successfully, anaconda envirnment , and use “conda list” can show "xgboost " .
but when import xgboost show the error: OSError: /home/yin/anaconda3/bin/…/lib/libgomp.so.1: version `GOMP_4.0’ not found (required by /home/yin/anaconda3/lib/python3.5/site-packages/xgboost-0.6-py3.5.egg/xgboost/libxgboost.so)
Operating System: Ubunutu kylin 16.10
Compiler:
Package used (python/R/jvm/C++): python
xgboost version used: latest
If installing from source, please provide
- The commit hash (
git rev-parse HEAD) - Logs will be helpful (If logs are large, please upload as attachment).
OSError: /home/yin/anaconda3/bin/…/lib/libgomp.so.1: version `GOMP_4.0’ not found (required by /home/yin/anaconda3/lib/python3.5/site-packages/xgboost-0.6-py3.5.egg/xgboost/libxgboost.so)
If you are using python package, please provide:
anaconda
- The python version and distribution: python 3.5.2
- The command to install
xgboostif you are not installing from source
If you are using R package, please provide
- The R
sessionInfo() - The command to install
xgboostif you are not installing from source
Steps to reproduce
What have you tried?
1.rebuild the xgboost,doesnt work
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (2 by maintainers)
Maybe you can try
conda install libgcc,which can resolve the problems like this,too @jiqiujiastep 1 : use the following commands to check whether the libgomp.so.1 file in anconda contains the required version GOMP_4.0 (replace the path by your own in all the steps) :
strings /home/yin/anaconda3/bin/../lib/libgomp.so.1 |grep GOMP( if there is not GOMP_4.0 version ,go to step 2, else leave a comment ) step 2: to check libgomp.so.1 in your OS:sudo find / -name libgomp.so.1*step3: check the link in anaconda :ls -al /home/yin/anaconda3/bin/../lib/libgomp.so.1if the link not link to the newest verison in step 2 's list , then make a new link to update it by:sudo rm -rf /home/yin/anaconda3/bin/../lib/libgomp.so.1sudo ln -s <path of the newest version libgomp file in your OS > <path in anaconda>(for examplesudo ln -s /usr/.../libgomp.so.XXX /home/yin/anaconda3/bin/..libgomp.so.1) ps:without my computer at hands,I can’t remember the concrete path ,but this method resolve my problems,in fact ,in my case, not only GOMP_4.0 but also some other files are not found(for example,this https://github.com/dmlc/xgboost/issues/1700 ), this solution works well too.I experienced a similar issue, fixed it by updating the anaconda gcc from 4.8.5 to 5.4.0:
conda install -c salford_systems gcc-5`GOMP_4.0’ not found This is an error due to mismatch of versions xgboost was built with and versions in the conda environment whcih xgboost uses to at runtime. The easiest way to solve the problem and not break anything is to build xgboost explicitly with conda’s libraries, for which the following needs to be done:
export LD_LIBRARY_PATH=~/work/anaconda3/lib #or whatever your anaconda install path iswhich pythonIf not, add anaconda distro to PATH:export PATH=~/work/anaconda3/bin:$PATHcd ~/xgboostmake clean_allmake -j4cd python-packagepython setup.py installyou can now close the terminal, and start a new one, LD_LIBRARY_PATdoes not need to persist, as conda’s env. got required libraries.
hello,thanks for your cares,the problem has been resolved.the key point is that i installed anaconda and the libgomp.so.1 and libstdc++.so.6 file in anaconda seems out of time,lacking GOMP_4.0 and some other files,but in Ubuntu 16.04 the corresponding files is new enough ,the solution is to make some link files to update the corresponding files in anaconda
@yinshurman would you mind posting the solution steps! thanx in advance