linux – Recognizing gcc 4.8.5 instead of 4.9.2 (CentOS 7/RHEL 7)
Good day to any kind soul and thank you in advance.
I’m having some troubles running a node application on a CentOS 7 distro, previously I had tried to run the application on a CentOS 6 instance to no avail since I couldn’t install the packages nodejs or npm version needed for the application (12.11.0 and 6.11.3 respectively) so I decided to check on CentOS 7 where I could install nodejs and npm, had some trouble trying to install the dependencies for the app and found that I needed to install the development tools bundle of packages that includes the CentOS yum groupinstall option.
I didn’t know at the time that it installs by default gcc 4.8.5, which let me install the dependencies needed when running npm install, but when trying to start the application using npm start I got the following error:
Here’s the package.json contents if this helps:
{
"name": "api",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node ./bin/www"
},
"dependencies": {
"bcrypt": "^5.1.1",
"cookie-parser": "~1.4.4",
"debug": "~2.6.9",
"express": "~4.16.1",
"express-jwt": "^8.4.1",
"express-promise-router": "^4.1.1",
"http-errors": "~1.6.3",
"json": "^11.0.0",
"jsonwebtoken": "^9.0.1",
"morgan": "~1.9.1",
"mssql": "^8.1.3",
"pg": "^8.11.3",
"properties-file": "^3.2.17",
"pug": "2.0.0-beta11",
"sqlite3": "^5.1.6"
}
}
as you can see it’s a simple expressjs application where I need to connect to multiple databases MSSQL, H2 (using the PG server mode) and SQLite and that’s as much information as i can provide about the project.
Tried:
-
Installing from source gcc 4.9.2 using the script provided in this github page confirmed that 4.9.2 was the version recognized when running gcc –version and g++ –version but when trying to run npm start, got the same error as before.
-
Checked if there was some configuration missing, like including something on the $PATH environment variable or adding “/usr/local/lib64/” to the ls.so.conf. again, no changes on the result.
Expected:
Errors from databases connections which are not configured properly for testing, since the moment the app starts it instantly establishes the connection to the 3 databases.
Read more here: Source link
