Installing on FreeBSD, error

Technical Support
  • I am getting the following when trying to run nodebb setup:

    5/9 18:51 [77800] - info: NodeBB Setup Triggered via Command Line
    
    Welcome to NodeBB!
    
    This looks like a new installation, so you'll have to answer a few questions about your environment before we can proceed.
    Press enter to accept the default setting (shown in brackets).
    URL used to access this NodeBB (http://localhost:4567) 
    Please enter a NodeBB secret (f424bbc1-94e5-43a9-9fc0-0d482d9f445b) 
    Which database to use (redis) 
    
    5/9 18:51 [77800] - info: Now configuring redis database:
    Host IP or address of your Redis instance (127.0.0.1) 
    Host port of your Redis instance (6379) 
    Password of your Redis database 
    Which database to use (0..n) (0) 
    Configuration Saved OK
    [email protected] node_modules/redis
    
    [email protected] node_modules/connect-redis
    └── [email protected] ([email protected])
    Populating database with default configs, if not already set...
    module.js:355
      Module._extensions[extension](this, filename);
                                   ^
    Error: /usr/local/lib/gcc48/libstdc++.so.6: version GLIBCXX_3.4.21 required by /usr/local/www/node/nodebb/node_modules/lwip/build/Release/lwip_image.node not found
        at Error (native)
        at Module.load (module.js:355:32)
        at Function.Module._load (module.js:310:12)
        at Module.require (module.js:365:17)
        at require (module.js:384:17)
        at /usr/local/www/node/nodebb/node_modules/lwip/lib/Image.js:3:22
        at Object.<anonymous> (/usr/local/www/node/nodebb/node_modules/lwip/lib/Image.js:15:3)
        at Module._compile (module.js:460:26)
        at Object.Module._extensions..js (module.js:478:10)
        at Module.load (module.js:355:32)
    

    Any ideas of what it could be?

  • Got it. Installed gcc5 and that solved the problem.

  • @Fastidious did you follow the official docs? If so, a pull request to add that extra step is greatly appreciated. Just hit the edit button on the top right 🙂

    EDIT: oops, I guess we don't even have a FreeBSD section in our docs. What OS did you use as your guide? Could add a new page copied and pasted from the original and adding your last step.

  • @psychobunny I simply installed node withpkg (did not use ports), cloned NodeBB and did the regular routine (npm install, nodebb setup, etc.). It was crashing on setup because I had gcc48. Installed gcc49, no dice. Finally installed gcc5 and updated libmap.conf under /etc/ as follows:

    libstdc++.so.6  gcc5/libstdc++.so.6
    

    And the beast took a deep breath, and opened its eyes. Hehe.

  • @psychobunny said:

    Could add a new page copied and pasted from the original and adding your last step.

    I can come up with a page. It should be fairly straight forward, but I already had many things installed on that VPS, so I am not sure if whatever requirements were needed I already had them.

  • You seem to know a lot more about this than any of our core team. Myself especially 😉

    If you could add a freebsd section to the docs then kudos to you, likely somebody else will run into the problem you had and I'd have no idea how to respond 😛

  • @psychobunny said:

    If you could add a freebsd section to the docs then kudos to you

    Done. Pull request pending.

  • Thanks! 🙂 the PR is missing a link from the OS page to your new page though

  • Which JS engine do you use, v8? Maybe it's related to that.

    I'm using FreeBSD too (now with mongodb), and I didn't have to install gcc5 or do any /etc changes to use NodeBB with redis.

  • @rfc2822 if you have a newer gcc installed, there is no reason to install or perform the changes I had to do. My server is not "vanilla" FreeBSD, it is "tinkering-a-lot" FreeBSD.

  • You wrote "It was crashing on setup because I had gcc48". I only have gcc-4.8.5 installed, too (I highly prefer Clang, so I'm not picky about having the latest gcc version).

  • @rfc2822 4.8.5 is fine, 4.8 is not. Do this:

    strings /usr/local/lib/gcc48/libstdc++.so.6 |grep GLIBCXX_3.4.21
    

    If you see it, you are fine.

  • Ok,. I have just thought every gcc48 version would crash for you. – So everything is OK 🙂

    Really love NodeBB & FreeBSD 🙂


Suggested Topics


  • 0 Votes
    1 Posts
    227 Views

    Hi all,

    still continuing on my OAuth2 plugin implementation, I've a problem I can't actually solve and need you valuable advises.

    I've this fragment in my plugin

    OAuth.getStrategy = function (strategies, callback) { winston.verbose('[maxonID] --> OAuth.getStrategy'); if (configOk) { passportOAuth = require('passport-oauth2'); passportOAuth.Strategy.prototype.userProfile = function (accessToken, done) { if (!accessToken) { done(new Error('Missing token, cannot call the userinfo endpoint without it.')); } this._oauth2.useAuthorizationHeaderforGET(true); this._oauth2.get(constants.userRoute, accessToken, function (err, body, res) { if (err) { console.error(err); return done(new Error('Failed to get user info. Exception was previously logged.')); } if (res.statusCode < 200 || res.statusCode > 299) { return done(new Error('Unexpected response from userInfo. [' + res.statusCode + '] [' + body + ']')); } OAuth.validateEntitlement(accessToken, constants.allowedEntitlement, function (err, accessAllowed) { if (err) { return done(err); } if (!accessAllowed) { // Need to find a way to gracefully notify the user and point back to login page return done(new Error('Forum access is not granted. Please contact your representative.')); } try { var json = JSON.parse(body); OAuth.parseUserReturn(json, function (err, profile) { ...

    and I'd like to return the user to the forum login page and notify him about the issue, something like when the password is wrong. Is there a smart way to make it happen from such a plugin without rising an error?

    Thanks a lot for your valuable insights, R.

  • 0 Votes
    8 Posts
    4k Views

    i had same issue and solved it by edit config.json as this

    {
    "url": "http://myurl.com",
    "secret": "..................",
    "database": "redis",
    "redis": {
    "host": "127.0.0.1",
    "port": "6379",
    "password": "?????",
    "database": "0"
    }
    }

  • 0 Votes
    6 Posts
    3k Views

    However, this is NO longer an issue with NodeBB 1.x since it's not using connect-mongo 1.x
    https://github.com/NodeBB/NodeBB/blob/0823cd94331a99b5c6ae5c696cd30215295f3a4c/package.json#L25

    it was an issue with 0.9.2.
    https://github.com/NodeBB/NodeBB/blob/v0.9.2/src/install.js#L16

  • 0 Votes
    7 Posts
    3k Views

    @jasperkade looks like the guide you are using does not have proper information.

    If you follow that guide you will end up installing the master branch (development version, more likely to have bugs) of NodeBB and not the stable release.

    The default database used to be redis (still redis on the latest stable release). Its changed to mongo on the master branch.

    It's always recommended to follow NodeBB docs as others might be outdated.

  • npm install mmmagic

    Solved Technical Support
    1 Votes
    3 Posts
    2k Views

    Just spent 3 hours trying to resolve it. You are my hero !