termux-user-repository / tur

A place for all types of Termux packages.
Other
450 stars 82 forks source link

[Bug]: MongoDB: Running `mongo` or `mongod` results in `Illegal instruction` #1130

Open tam0705 opened 2 months ago

tam0705 commented 2 months ago

Problem description

mongo or mongod from package MongoDB would always output Illegal instruction with or without parameters. I have tried this both in a fresh install of Termux and an already used one.

What steps will reproduce the bug?

  1. Prepare & install tur-repo
    pkg i tur-repo
    pkg update && pkg upgrade
  2. Install mongodb pkg i mongodb
  3. Run mongo or mongod with or without any parameters

What is the expected behavior?

Output:

Illegal instruction

System information

Since I don't know how to copy-paste from a Termux terminal, here is the screenshot instead.. termux-info (for fresh install of termux): image

tam0705 commented 2 months ago

After further testing I found that my Android version was probably too old (Android 10). There is no problem running mongo or mongod in Android 14. Since in my case I have no choice but to use Android 10 that means I need to build older version of mongodb myself.

licy183 commented 2 months ago

I can't reproduce it with Bluestacks on my machine, and I don't think this is related to the Android version. I'll try it with AVD this weekend.

tam0705 commented 2 months ago

This is the summary of Android versions I've tested:

Seems that the issue indeed is not related to Android version, but exclusive to AVDs instead. Tried it in my personal smartphone and encountered no issues.