更多详细信息:由于我无法成为root用户,所以我无法在OpenShift上更新GLIBC版本(除非有一些解决方法).我无法在OpenShift上直接编译PhantomJS,因为我没有足够的空间容纳该服务器上的源.我的OpenShift墨盒:Tomcat 7(JBoss EWS 2.0)+ MongoDB 2.4 + RockMongo 1.1.在我的Debian服务器上: $ uname -aLinux servername 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2 x86_64 GNU/Linux$ strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCGLIBCXX_3.4GLIBCXX_3.4.1GLIBCXX_3.4.2GLIBCXX_3.4.3GLIBCXX_3.4.4GLIBCXX_3.4.5GLIBCXX_3.4.6GLIBCXX_3.4.7GLIBCXX_3.4.8GLIBCXX_3.4.9GLIBCXX_3.4.10GLIBCXX_3.4.11GLIBCXX_3.4.12GLIBCXX_3.4.13GLIBCXX_3.4.14GLIBCXX_3.4.15GLIBCXX_3.4.16GLIBCXX_3.4.17GLIBC_2.2.5GLIBC_2.3GLIBC_2.3.2GLIBCXX_DEBUG_MESSAGE_LENGTH 在我的OpenShift服务器上: $ uname -aLinux servername 2.6.32-504.3.3.el6.x86_64 #1 SMP Fri Dec 12 16:05:43 EST 2014 x86_64 x86_64 x86_64 GNU/Linux$ strings /usr/lib/libstdc++.so.6 | grep GLIBCGLIBCXX_3.4GLIBCXX_3.4.1GLIBCXX_3.4.2GLIBCXX_3.4.3GLIBCXX_3.4.4GLIBCXX_3.4.5GLIBCXX_3.4.6GLIBCXX_3.4.7GLIBCXX_3.4.8GLIBCXX_3.4.9GLIBCXX_3.4.10GLIBCXX_3.4.11GLIBCXX_3.4.12GLIBCXX_3.4.13GLIBC_2.0GLIBC_2.3GLIBC_2.4GLIBC_2.1GLIBC_2.1.3GLIBC_2.3.2GLIBC_2.2GLIBCXX_FORCE_NEWGLIBCXX_DEBUG_MESSAGE_LENGTH解决方案由于OpenShift Online在RHEL上运行,因此您应该能够将CentOS安装到本地计算机上的VM(或在本地的云中运行)并编译版本的PhantomJS及其补丁,然后将其上传到您的OpenShift服务器并使用.如果无法执行此操作,请使用help.openshift.com上的与我们联系"表单,并参考此stackoverflow问题.tl;drHow to solve version 'GLIBCXX_3.4.15' not found when I cannot be root on the Linux server?I'm tring to use PhantomJS on OpenShift. As explained in this article, PhantomJS GhostDriver binds on localhost only, while on OpenShift, you cannot bind anything on localhost (you need to specify the machine IP address). Paolo Bernardi (the author of the article) shares a patch that fixes PhantomJS, so that it's possible to bind on an IP address.The problem is that the provided patch does not work on my OpenShift server: when running ./phantomjs -v on my patched PhantomJS installation, I catch a segmentation fault. So I decided to compile PhantomJS with the fix by myself on a Debian server I have, thanks to PhantomJS documentation:sudo apt-get install build-essential g++ flex bison gperf ruby perl libsqlite3-dev libfontconfig1-dev libicu-dev libfreetype6 libssl-dev libpng-dev libjpeg-dev python ttf-mscorefonts-installergit clone git://github.com/ariya/phantomjs.gitcd phantomjsgit checkout 1.9# apply the fix./build.shWhen running ./phantomjs -v on the compiled binary, I get 1.9.8: it worked.When copying this binary on OpenShift and running ./phantomjs -v, I catch an error:./phantomjs: /usr/lib64/libstdc++.so.6: version 'GLIBCXX_3.4.15' not found (required by ./phantomjs)Any idea how to solve this? What's the reason of this error? Please excuse my lack of system knownledge :)Update (and solution):Thanks to moleculartear, I compiled a patched binary on an RHEL OS: no error anymore!The working PhantomJS binary: https://github.com/jrestful/server/blob/master/seo/phantomjs-1.9.8-patched.tar.gz?raw=trueMore details:I cannot update GLIBC version on OpenShift since I cannot be root (unless there are some workarounds).I cannot compile PhantomJS on OpenShift directly since I don't have enough space for the sources on that server.My OpenShift cartridges: Tomcat 7 (JBoss EWS 2.0) + MongoDB 2.4 + RockMongo 1.1.On my Debian server:$ uname -aLinux servername 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2 x86_64 GNU/Linux$ strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCGLIBCXX_3.4GLIBCXX_3.4.1GLIBCXX_3.4.2GLIBCXX_3.4.3GLIBCXX_3.4.4GLIBCXX_3.4.5GLIBCXX_3.4.6GLIBCXX_3.4.7GLIBCXX_3.4.8GLIBCXX_3.4.9GLIBCXX_3.4.10GLIBCXX_3.4.11GLIBCXX_3.4.12GLIBCXX_3.4.13GLIBCXX_3.4.14GLIBCXX_3.4.15GLIBCXX_3.4.16GLIBCXX_3.4.17GLIBC_2.2.5GLIBC_2.3GLIBC_2.3.2GLIBCXX_DEBUG_MESSAGE_LENGTHOn my OpenShift server:$ uname -aLinux servername 2.6.32-504.3.3.el6.x86_64 #1 SMP Fri Dec 12 16:05:43 EST 2014 x86_64 x86_64 x86_64 GNU/Linux$ strings /usr/lib/libstdc++.so.6 | grep GLIBCGLIBCXX_3.4GLIBCXX_3.4.1GLIBCXX_3.4.2GLIBCXX_3.4.3GLIBCXX_3.4.4GLIBCXX_3.4.5GLIBCXX_3.4.6GLIBCXX_3.4.7GLIBCXX_3.4.8GLIBCXX_3.4.9GLIBCXX_3.4.10GLIBCXX_3.4.11GLIBCXX_3.4.12GLIBCXX_3.4.13GLIBC_2.0GLIBC_2.3GLIBC_2.4GLIBC_2.1GLIBC_2.1.3GLIBC_2.3.2GLIBC_2.2GLIBCXX_FORCE_NEWGLIBCXX_DEBUG_MESSAGE_LENGTH 解决方案 Since OpenShift Online runs on RHEL, you should be able to install CentOS into a VM on your local machine (or run one in the cloud somewhere) and compile a version of PhantomJS with the patch and then upload it to your OpenShift server and use it.If you can't do that please use the contact us form at help.openshift.com and reference this stackoverflow question. 这篇关于尝试在OpenShift上运行PhantomJS:无法修补GhostDriver,使其可以绑定在服务器IP地址上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-05 09:26
查看更多