Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

brendaelliott201

macrumors newbie
Original poster
Jul 19, 2024
14
2
Hello gurus,
Please I have been facing an error for over 2 weeks now whenever I try to install "watchman, mongoldb, postgreSQL" and some other software using brew, the installation would continue and almost done until it would show an error like the following complaining of 02.make file and it would the following error:

==> Installing dependencies for mongodb/brew/mongodb-community: node and mongosh


==> Installing mongodb/brew/mongodb-community dependency: node


==> Downloading https://formulae.brew.sh/api/formula.jws.json


-#O#- # #


==> ./configure --without-npm --without-corepack --with-intl=system-icu --shared


==> make install


Last 15 lines from /Users/d3v_hack3r/Library/Logs/Homebrew/node/02.make:


note: use 'gnu++2a' for 'Working draft for ISO C++ 2020 with GNU extensions' standard


make[1]: *** [/private/tmp/node-20240720-4211-17n8en/node-v22.4.1/out/Release/obj.target/ada/deps/ada/ada.o] Error 1


error: invalid value 'gnu++20' in '-std=gnu++20'


note: use 'c++98' or 'c++03' for 'ISO C++ 1998 with amendments' standard


note: use 'gnu++98' or 'gnu++03' for 'ISO C++ 1998 with amendments and GNU extensions' standard


note: use 'c++11' for 'ISO C++ 2011 with amendments' standard


note: use 'gnu++11' for 'ISO C++ 2011 with amendments and GNU extensions' standard


note: use 'c++14' for 'ISO C++ 2014 with amendments' standard


note: use 'gnu++14' for 'ISO C++ 2014 with amendments and GNU extensions' standard


note: use 'c++17' for 'ISO C++ 2017 with amendments' standard


note: use 'gnu++17' for 'ISO C++ 2017 with amendments and GNU extensions' standard


note: use 'c++2a' for 'Working draft for ISO C++ 2020' standard


note: use 'gnu++2a' for 'Working draft for ISO C++ 2020 with GNU extensions' standard


make[1]: *** [/private/tmp/node-20240720-4211-17n8en/node-v22.4.1/out/Release/obj.target/nbytes/deps/nbytes/nbytes.o] Error 1


make: *** [node] Error 2


Please how can I get this error solved? This 02.make file has been disturbing my productivity and wouldn't allow me do things I am supposed to do.

Thank you
 
change -std=gnu++20 to -std=gnu++2a.

That should solve the problem.
Thank you so much @Slartibart , please in which file would I make the changes? I tried to use nano to check if the change is inside /Users/name/Library/Logs/Homebrew/node/02.make but the 02.make or 02 isn't a file as there is no file like such.

Please in which file would I make the changes? Note that this same error occur when I try to install some packages like "watchman, mongodb, postgreSQL" .

I appreciate your concern and interest to help me out.

Thank you
 
Some documentation aren't as straightforward as the real installation for specific OS version is, there is no different installation I have not tried to install watchman, mongodb e.t.c.... but for Catalina 10.15 or version that Apple doesn't currently support is a time consuming if you have not met with someone who has encountered and solved the error. I would see same error of the "Last 15 lines from /Users/name/Library/Logs/Homebrew/node/02.make:" even when I install some other packages that would make use of that "make install" during the installation, meaning the error isn't those package but with configuration on my Mac Catalina 10.15.
 
Thank you so much @Slartibart , please in which file would I make the changes? I tried to use nano to check if the change is inside /Users/name/Library/Logs/Homebrew/node/02.make but the 02.make or 02 isn't a file as there is no file like such.

Please in which file would I make the changes? Note that this same error occur when I try to install some packages like "watchman, mongodb, postgreSQL" .

I appreciate your concern and interest to help me out.

Thank you
As @bogdanw indicated, there are prebuilt binaries available. This is the easier route. 🙂

Otherwise: usually you can provide compiler or linker flags in the beginning when you run configure.
Or if you run (a) provided Makefile(s), you have to edit them accordingly.
You can locate any Makefile via executing e.g. find . -iname "Makefile" in the root source code folder. Other methods are available. 😎
 
@bogdanw I downloaded the MongoDB archive and I followed the steps to decompress and add the path to environment variable using the following steps (https://treehouse.github.io/installation-guides/mac/mongo-mac.html) and everything went fine but when I launch the MongoDB deamon using the "~/mongo/bin/mongod" to start the deamon before I launch the mongo shell with the command (~/mongo/bin/mongo), I go the following error for launching the mongo deamon(~/mongo/bin/mongod)

laptop_name@laptop_name ~ % ~/mongodb/bin/mongod


{"t":{"$date":"2024-07-21T19:46:14.018+01:00"},"s":"I", "c":"NETWORK", "id":4915701, "ctx":"-","msg":"Initialized wire specification","attr":{"spec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":13},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":13},"outgoing":{"minWireVersion":0,"maxWireVersion":13},"isInternalClient":true}}}


{"t":{"$date":"2024-07-21T19:46:14.054+01:00"},"s":"I", "c":"CONTROL", "id":23285, "ctx":"-","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"}


{"t":{"$date":"2024-07-21T19:46:14.173+01:00"},"s":"W", "c":"ASIO", "id":22601, "ctx":"thread1","msg":"No TransportLayer configured during NetworkInterface startup"}


{"t":{"$date":"2024-07-21T19:46:14.174+01:00"},"s":"I", "c":"NETWORK", "id":4648602, "ctx":"thread1","msg":"Implicit TCP FastOpen in use."}


{"t":{"$date":"2024-07-21T19:46:14.196+01:00"},"s":"W", "c":"ASIO", "id":22601, "ctx":"thread1","msg":"No TransportLayer configured during NetworkInterface startup"}


{"t":{"$date":"2024-07-21T19:46:14.202+01:00"},"s":"I", "c":"REPL", "id":5123008, "ctx":"thread1","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationDonorService","ns":"config.tenantMigrationDonors"}}


{"t":{"$date":"2024-07-21T19:46:14.202+01:00"},"s":"I", "c":"REPL", "id":5123008, "ctx":"thread1","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationRecipientService","ns":"config.tenantMigrationRecipients"}}


{"t":{"$date":"2024-07-21T19:46:14.202+01:00"},"s":"I", "c":"CONTROL", "id":5945603, "ctx":"thread1","msg":"Multi threading initialized"}


{"t":{"$date":"2024-07-21T19:46:14.203+01:00"},"s":"I", "c":"CONTROL", "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":15932,"port":27017,"dbPath":"/data/db","architecture":"64-bit","host":"d3v-hack3rs-MacBook-Pro.local"}}


{"t":{"$date":"2024-07-21T19:46:14.204+01:00"},"s":"I", "c":"CONTROL", "id":23403, "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"5.0.28","gitVersion":"a8f8b8e1e271f236e761d0138e2418d0a114c941","modules":[],"allocator":"system","environment":{"distarch":"x86_64","target_arch":"x86_64"}}}}


{"t":{"$date":"2024-07-21T19:46:14.204+01:00"},"s":"I", "c":"CONTROL", "id":51765, "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Mac OS X","version":"19.5.0"}}}


{"t":{"$date":"2024-07-21T19:46:14.204+01:00"},"s":"I", "c":"CONTROL", "id":21951, "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{}}}


{"t":{"$date":"2024-07-21T19:46:14.227+01:00"},"s":"I", "c":"NETWORK", "id":5693100, "ctx":"initandlisten","msg":"Asio socket.set_option failed with std::system_error","attr":{"note":"acceptor TCP fast open","option":{"level":6,"name":261,"data":"00 04 00 00"},"error":{"what":"set_option: Invalid argument","message":"Invalid argument","category":"asio.system","value":22}}}


{"t":{"$date":"2024-07-21T19:46:14.243+01:00"},"s":"E", "c":"CONTROL", "id":20557, "ctx":"initandlisten","msg":"DBException in initAndListen, terminating","attr":{"error":"NonExistentPath: Data directory /data/db not found. Create the missing directory or specify another path using (1) the --dbpath command line option, or (2) by adding the 'storage.dbPath' option in the configuration file."}}


{"t":{"$date":"2024-07-21T19:46:14.243+01:00"},"s":"I", "c":"REPL", "id":4784900, "ctx":"initandlisten","msg":"Stepping down the ReplicationCoordinator for shutdown","attr":{"waitTimeMillis":15000}}


{"t":{"$date":"2024-07-21T19:46:14.244+01:00"},"s":"I", "c":"COMMAND", "id":4784901, "ctx":"initandlisten","msg":"Shutting down the MirrorMaestro"}


{"t":{"$date":"2024-07-21T19:46:14.244+01:00"},"s":"I", "c":"SHARDING", "id":4784902, "ctx":"initandlisten","msg":"Shutting down the WaitForMajorityService"}


{"t":{"$date":"2024-07-21T19:46:14.244+01:00"},"s":"I", "c":"NETWORK", "id":20562, "ctx":"initandlisten","msg":"Shutdown: going to close listening sockets"}


{"t":{"$date":"2024-07-21T19:46:14.244+01:00"},"s":"I", "c":"NETWORK", "id":4784905, "ctx":"initandlisten","msg":"Shutting down the global connection pool"}


{"t":{"$date":"2024-07-21T19:46:14.244+01:00"},"s":"I", "c":"CONTROL", "id":4784906, "ctx":"initandlisten","msg":"Shutting down the FlowControlTicketholder"}


{"t":{"$date":"2024-07-21T19:46:14.244+01:00"},"s":"I", "c":"-", "id":20520, "ctx":"initandlisten","msg":"Stopping further Flow Control ticket acquisitions."}


{"t":{"$date":"2024-07-21T19:46:14.244+01:00"},"s":"I", "c":"NETWORK", "id":4784918, "ctx":"initandlisten","msg":"Shutting down the ReplicaSetMonitor"}


{"t":{"$date":"2024-07-21T19:46:14.245+01:00"},"s":"I", "c":"SHARDING", "id":4784921, "ctx":"initandlisten","msg":"Shutting down the MigrationUtilExecutor"}


{"t":{"$date":"2024-07-21T19:46:14.245+01:00"},"s":"I", "c":"ASIO", "id":22582, "ctx":"MigrationUtil-TaskExecutor","msg":"Killing all outstanding egress activity."}


{"t":{"$date":"2024-07-21T19:46:14.245+01:00"},"s":"I", "c":"COMMAND", "id":4784923, "ctx":"initandlisten","msg":"Shutting down the ServiceEntryPoint"}


{"t":{"$date":"2024-07-21T19:46:14.245+01:00"},"s":"I", "c":"CONTROL", "id":4784928, "ctx":"initandlisten","msg":"Shutting down the TTL monitor"}


{"t":{"$date":"2024-07-21T19:46:14.245+01:00"},"s":"I", "c":"CONTROL", "id":4784929, "ctx":"initandlisten","msg":"Acquiring the global lock for shutdown"}


{"t":{"$date":"2024-07-21T19:46:14.246+01:00"},"s":"I", "c":"-", "id":4784931, "ctx":"initandlisten","msg":"Dropping the scope cache for shutdown"}


{"t":{"$date":"2024-07-21T19:46:14.246+01:00"},"s":"I", "c":"FTDC", "id":4784926, "ctx":"initandlisten","msg":"Shutting down full-time data capture"}


{"t":{"$date":"2024-07-21T19:46:14.246+01:00"},"s":"I", "c":"CONTROL", "id":20565, "ctx":"initandlisten","msg":"Now exiting"}


{"t":{"$date":"2024-07-21T19:46:14.246+01:00"},"s":"I", "c":"CONTROL", "id":23138, "ctx":"initandlisten","msg":"Shutting down","attr":{"exitCode":100}}

Please what is the meaning of this error. I still can't run mongodb and watchman on my MacBook Pro Catalina 10.15 and I have done different type of installation. This is really affecting my productivity.

Please help
 
change -std=gnu++20 to -std=gnu++2a.

That should solve the problem.
Hi @Slartibart , Please help me respond to this @Slartibart because I have tried many things, I believe that if I solve the 02.make error that stopped many installation only Mac Catalina 10.15, that will make me to install MongoDB, watchman and other applications that are being interrupted by this 02.make file.

Please in which file or location of the file where I will make the change you mentioned? This change below:

change -std=gnu++20 to -std=gnu++2a.
 
On Catalina, you can install MongoDB Community Edition 6

- download mongodb-macos-x86_64-6.0.16.tgz from https://www.mongodb.com/try/download/community

- unarchive mongodb-macos-x86_64-6.0.16.tgz and copy mongos, install_compass, and mongod into /usr/local/bin/

If it doesn’t exit, you can create the folder with sudo mkdir -p /usr/local/bin

- create the data and log folders with

mkdir -p ~/data/db

mkdir -p ~/data/log/mongodb

- Run MongoDB with

mongod --dbpath ~/data/db --logpath ~/data/log/mongodb/mongo.log –fork

- check if it’s running with

ps aux | grep -v grep | grep mongod

If you want to use MongoDB Shell (mongosh)

- download mongosh-1.10.6-darwin-x64.zip from https://www.mongodb.com/try/download/shell

- unzip mongosh-1.10.6-darwin-x64.zip and copy mongosh_crypt_v1.dylib and mongosh into /usr/local/bin/

If you want to use MongoDB Compass Download (GUI), download mongodb-compass-1.43.4-darwin-x64.dmg from https://www.mongodb.com/try/download/compass open the dmg and drag the MongoDB Compass app into Applications

I adapted the instructions from https://www.mongodb.com/docs/v6.0/tutorial/install-mongodb-on-os-x-tarball/
 
  • Like
Reactions: Slartibart
Additionaly a general comment on using brew and e.g. compiler or linker flags not available through brew:

you can use brew install -i package to get a shell with the package to be installed extracted to a temporary directory. From there, you can use ./configure --help to list all possible flags for the particular software.

you then can proceed as you would with a normal installation without brew ./configure [flags] -> make -> make install. After that, when you exit, brew should pick up the finished build and you are done.
 
On Catalina, you can install MongoDB Community Edition 6

- download mongodb-macos-x86_64-6.0.16.tgz from https://www.mongodb.com/try/download/community

- unarchive mongodb-macos-x86_64-6.0.16.tgz and copy mongos, install_compass, and mongod into /usr/local/bin/

If it doesn’t exit, you can create the folder with sudo mkdir -p /usr/local/bin

- create the data and log folders with

mkdir -p ~/data/db

mkdir -p ~/data/log/mongodb

- Run MongoDB with

mongod --dbpath ~/data/db --logpath ~/data/log/mongodb/mongo.log –fork

- check if it’s running with

ps aux | grep -v grep | grep mongod

If you want to use MongoDB Shell (mongosh)

- download mongosh-1.10.6-darwin-x64.zip from https://www.mongodb.com/try/download/shell

- unzip mongosh-1.10.6-darwin-x64.zip and copy mongosh_crypt_v1.dylib and mongosh into /usr/local/bin/

If you want to use MongoDB Compass Download (GUI), download mongodb-compass-1.43.4-darwin-x64.dmg from https://www.mongodb.com/try/download/compass open the dmg and drag the MongoDB Compass app into Applications

I adapted the instructions from https://www.mongodb.com/docs/v6.0/tutorial/install-mongodb-on-os-x-tarball/
@Slartibart Thank you for your devoted time and I am very happy to follow the guideline here. When I follow the guideline to start mongo daemon using the steps you mentioned, when I executed the command(mongod --dbpath ~/data/db --logpath ~/data/log/mongodb/mongo.log –fork) after finishing the setup guide, it flagged the "-fork" as an invalid command and I removed it and executed the command without the "-fork" flag, it displayed the following and waited with prompt:

user1@user1-MacBook-Pro ~ % mongod --dbpath ~/data/db --logpath ~/data/log/mongodb/mongo.log


{"t":{"$date":"2024-07-22T08:58:17.475Z"},"s":"I", "c":"CONTROL", "id":20697, "ctx":"-","msg":"Renamed existing log file","attr":{"oldLogPath":"/Users/user1/data/log/mongodb/mongo.log","newLogPath":"/Users/user1/data/log/mongodb/mongo.log.2024-07-22T08-58-17"}}

The terminal waited on prompt as if it was waiting for me, then I opened another terminal to check if the service is running and I got the following:

user1@user1-MacBook-Pro ~ % ps aux | grep -v grep | grep mongod

user1 18629 0.1 0.2 5574196 36900 s004 S+ 9:58AM 0:01.35 mongod --dbpath /Users/user1/data/db --logpath /Users/user1/data/log/mongodb/mongo.log

Does the above means that the MongoDB service is running?


Thank you so much and I appreciate you.
 
Additionaly a general comment on using brew and e.g. compiler or linker flags not available through brew:

you can use brew install -i package to get a shell with the package to be installed extracted to a temporary directory. From there, you can use ./configure --help to list all possible flags for the particular software.

you then can proceed as you would with a normal installation without brew ./configure [flags] -> make -> make install. After that, when you exit, brew should pick up the finished build and you are done.
@Slibartibart, I am a Fullstack developer with experiences but always been developing on Windows, now I got MacOS Catalina 10.15.5 to be used for my project but setting it up for development has been hell. The only thing I want to get rid is that 02.make file that stops most of my important installation. The installation you mentioned here is what I can't just comprehend especially for "watchman" which is important for my development. When I use "brew install watchman", it would do normal installation but stuck and complain of 02.make and it would the installation prematurely. Some installation would finish using Homebrew "brew" while some would complain this same 02.make complain.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.