Error running Couchbase lite on Tomcat on Centos

Hi, i have a web project using Couchbase Lite (java) and it works well on a windows environment. Now i’m trying to deploying the war file into a centos server, but it fails to start. I see this error in the log. Any suggestions to overcome this ? I have gcc 4.9 running on it.

04-Apr-2017 11:52:43.845 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class testws.QuartzListener
java.lang.UnsatisfiedLinkError: /usr/local/tomcat/temp/libCouchbaseLiteJavaForestDB.so: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18’ not found (required by /usr/local/tomcat/temp/libCouchbaseLiteJavaForestDB.so)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at com.couchbase.lite.util.NativeLibUtils.loadLibrary(NativeLibUtils.java:45)
at com.couchbase.lite.store.ForestDBStore.(ForestDBStore.java:75)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.couchbase.lite.Database.createStoreInstance(Database.java:1151)
at com.couchbase.lite.Database.open(Database.java:1216)
at com.couchbase.lite.Manager.openDatabase(Manager.java:335)
at com.couchbase.lite.Manager.getDatabase(Manager.java:299)
at testws.CouchbaseSingleton.(CouchbaseSingleton.java:23)
at testws.CouchbaseSingleton.getInstance(CouchbaseSingleton.java:40)
at testws.QuartzListener.contextInitialized(QuartzListener.java:29)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4745)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:952)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1823)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

CentOS is notoriously slow at updating their tooling. I think the version of libstdc++ on the machine is too old. That is what the message is indicating. You need to alter your LD_LIBRARY_PATH to point to one that is sufficiently new (looks like 4.7 or higher)