Cannot install MongoDB Community on Apple M1 - mongodb

I have an Apple M1 using macOS Monterey and I am trying to install MongoDB community latest version. After following the documentation on the website I received this error message (note: I am using a Rosetta terminal because M1 chips do not support homebrew). Does anyone know what is happening with this error? Please help.
What I have tried:
stopping and restarting the service and again it does not work when I then type "mongo" or "mongosh" I get an error to refuse to connect.
I also tried uninstalling and reinstalling many times.
Possible error is the line Already downloaded: /Users/katejohnson/Library/Caches/Homebrew/downloads/5bd79f1c70119d0cda4b01fc074ad77ad00a7e8dfc9b243016157d9ee7009874--mongosh-1.3.1.bottle_manifest.json When I download it (see terminal screenshot)
brew services start mongodb-community#5.0
Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/katejohnson/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist` exited with 5.
Terminal screenshot

Restart your macOS. Run brew services start mongodb-community#5.0. It should fix the problem!
The issue is with the .plist file that needs to be present in LaunchAgents directory for launchctl to run mongod service on startup.

Related

Flutter simply showing 'sysctl -n hw.optional.arm64' returned unexpected output: ''

Not sure which details are relevant so I'll include as many as possible.
Had to upgrade flutter today and instead of working when I typed in 'flutter upgrade' into android studios terminal/Iterm2/terminal zsh I was met with the following response.
'sysctl -n hw.optional.arm64' returned unexpected output: ''
When I search for this issue the only thing i can find is this post which states that sysctl can't be found. The path does appear to be in my .zshrc but still not working. I can't use which or where sysctl as it just says 'sysctl not found'
When I try to upgrade flutter through brew (brew install --cask flutter) it downloads fine but on installing it throws the following error:
==> Purging files for version 3.3.5 of Cask flutter
Error: It seems there is already a Binary at '/opt/homebrew/bin/dart'.
I can't continue working as I need the new flutter version and it seems the web doesn't have much to show for this particular error.
I can't flutter --version, flutter doctor or anything of the sort as I just get the same message.
I'm using:
MacOS monterey 12.6 macbook air.
Android studios
Iterm2
Ohmyzsh
When I open android studios it shows me the following:
"Flutter device daemon #1 exited (exit code 1), stderr: 'sysctl -n hw.optional.arm64' returned unexpected output: '' in a pop up window.
Pubspec has been edited > get dependencies > Upgrade depenedencies: Both of which have the same error as in the title.
The current configured flutter SDK is not known to be fully supported. Please update your SDK and restart intelliJ which I think is what I've been trying to do.
This is an answer I hope will be helpful for others who have the same issue.
Other answers suggested a fix by just updating the path document (.zshrc) but this is what helped me as that did not and my paths were up to date.
Sadly, it's as simple as manually deleting all my flutter SDK files locally. Downloading them again (this time the latest one) and unzipping it into the same place. Didn't even have to update the path).
Worked a charm, issues appear to be all gone except that the dialogue in android studios is still saying that there are dependencies that need getting and upgrading (but doesn't go away even when I've run it).
I solved it by removing the old flutter SDK, downloading the latest version, and setting it up again.
it works perfectly for me!

Error running pod install (Flutter android studio)

im having trouble building my flutter project on my mac M1. When i try launching it in android studio im getting the error code 'error running pod install' and when i try opening it in xcode im getting 'module cloud_firestore not found'.
I have tried all the solutions in this thread How to solve "error running pod install" in flutter on mac? but nothing seems to work.
Im having no troble building flutter project without any dependencies but as soon as i add one im getting the error messages mentioned above, any ideas on how i could solve this?
I came to this problem as well (Macbook Air M1). I also tried the solution on your mentioned link but failed. However, finally I could solve the problem by following the steps on 'Deploy to iOS Device'
https://docs.flutter.dev/get-started/install/macos#install-xcode
Run this code on Terminal
$ sudo gem install cocoapods
$ sudo gem install ffi -- --enable-libffi-alloc
Restart Android Studio

gradle/wrapper: utime impossible: Operation not permitted after run "flutter doctor"

I created a new flutter project and I executed the command
flutter doctor
It returns me the following error.
/usr/bin/tar: gradle/wrapper: utime impossible: Operation not allowed
/usr/bin/tar: gradle/wrapper: mode cannot be changed to rwxr-xr-x: Operation not allowed
/usr/bin/tar: gradle: utime impossible: Operation not allowed
/usr/bin/tar: gradle: mode cannot be changed to rwxr-xr-x: Operation not allowed
/usr/bin/tar: Shutdown with failure code due to previous errors
To solve the problem I accode all rights to the file in question "usr/bin/tar". But the problem still persists. After I installed gradle/enter image description herewrapper but the problem persists
I am using Fedora as my operating system
My solution for Ubuntu:
I deleted the /flutter/bin/cache directory. Then I could run
flutter doctor
and
flutter pub get
without any issues.
I had the same issue, using ubuntu.
I used the command sudo snap install flutter --classic
then I logged in as root and performed flutter doctor, it was ok.

Could not run VS Code on CentOS 7 with x2go

I have installed the latest version of VS Code on CentOS 7.
However when I try to run VS Code, it loads for some time trying to open, but then nothing happens, no errors, nothing.
I have tried to installed both trough rpm package and zipped files, but got the same result in both cases.
I'm using x2go to connect to my CentOS 7.
Add the following line to the file /etc/x2go/x2goagent.options:
X2GO_NXAGENT_DEFAULT_OPTIONS+=" -extension BIG-REQUESTS"
Then restart the server and try again.
I had the same problem and added the --verbose flag to get more info (see below). Googling for the "gl_surface_glx.cc" error brought me to https://github.com/atom/atom/issues/4360 which contains the above workaround. VS Code now works for me on CentOS7 with X2GO.
Without this workaround the following error is seen (using the --verbose flag):
$ code --user-data-dir=/home/user1646217
--verbose [19526:0719/091952.335817:WARNING:audio_manager.cc(317)] Multiple instances of AudioManager detected
[19526:0719/091952.335923:WARNING:audio_manager.cc(278)] Multiple
instances of AudioManager detected
[19549:0719/091952.363736:ERROR:gl_surface_glx.cc(411)] GLX 1.3 or
later is required.
[19549:0719/091952.363836:ERROR:gl_initializer_x11.cc(130)]
GLSurfaceGLX::InitializeOneOff failed.
[19549:0719/091952.366430:ERROR:gpu_child_thread.cc(327)] Exiting GPU
process due to errors during initialization

Ionic emulate Ios fails to run The session does not open my app

Ionic emulate ios failed on Mac OS Yosemite. Their have some cases were the ios device emulated, but shortly after the terminal console shoots up the error message below.
** BUILD SUCCEEDED **
No target specified for emulator. Deploying to iPhone-6 simulator
An error was encountered processing the command (code=146):
Invalid device state
An error was encountered processing the command (code=146):
Exception encountered connecting to CoreSimulatorBridge: Unable to connect to CoreSimulatorBridge
ENOENT, no such file or directory '/Users/yay/Library/Logs/CoreSimulator/2CAA2C39-7F22-4AF2-BBDE-86609188F37C/system.log'
Error code 1 for command: ios-sim with args: launch,/Users/yay/code/myApp/platforms/ios/build/emulator/myApp.app,--devicetypeid,com.apple.CoreSimulator.SimDeviceType.iPhone-6,--stderr,/Users/yay/code/myApp/platforms/ios/cordova/console.log,--stdout,/Users/yay/code/myApp/platforms/ios/cordova/console.log,--exit
Error: /Users/yay/code/myApp/platforms/ios/cordova/run: Command failed with exit code 2
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:134:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
The issue is because you used sudo to create and/or build the project.
Just input these commands (without the $ of course):
1) Remove with sudo
$ sudo ionic platform remove ios
2) Add iOS back without sudo
$ ionic platform add ios
3) Run iOS emulator
$ ionic emulate ios
Source: https://github.com/driftyco/ionic/issues/4052 (rajkotecha's comment)
Do NOT use sudo when creating or building the project.
Please see https://github.com/driftyco/ionic/issues/4052
I've encountered this issue before, and I believe you messed up with your permission. However, I managed to solve it by reinstall everything from scratch (NOT reformat OS). I suggest you may try to remove all your Xcode, ionic, cordova, and ios-sim content and reinstall again.
Delete your Xcode from your Mac OS.
Remove everything inside:
/usr/local/bin
/usr/local/include
/usr/local/lib/dtrace
/usr/local/share/man/man1
/usr/local/share/systemtap/tapset/
Delete the folder:
/usr/local/lib/node_modules
Once you done the instruction above, kindly use your spotlight to search for keywords such as node, cordova, ionic, etc... to see whether it is still exist or not. Please also ensure yourApp within your Users/username folder is deleted.
You may also try to use your terminal input:
npm -v
cordova -v
ionic -v
It will shows nothing/not found if you've deleted everything completely.
Now you can download and install Xcode from App Store, and wait for Xcode is fully installed in your Mac, then proceed to here to start again your ionic project.
Lastly, once you begin to create an ionic project, by right you no need to use any sudo commands anymore in creating or building this project.
Example:
ionic build ios
Instead of:
sudo ionic build ios
It should be working unless you are not the root user.
Happy coding and have a nice day! :D