Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

impossible to install on arm64 #12

Open
ndx1905-github opened this issue Nov 29, 2022 · 4 comments
Open

impossible to install on arm64 #12

ndx1905-github opened this issue Nov 29, 2022 · 4 comments

Comments

@ndx1905-github
Copy link

Describe the bug

Impossible to install on my instance

Context

  • Hardware: ARM64 with 4 cores and 24Gb VM
  • YunoHost version: 11.0.10.2 (stable)
  • First install through WebUI

Logs

https://paste.yunohost.org/raw/alaweheyim

@felixg3
Copy link

felixg3 commented Jan 4, 2023

There are no binaries of mongodb available for arm64. They would need to be compiled manually

@felixg3
Copy link

felixg3 commented Jan 4, 2023

I managed to fix the issue by downloading the arm64 binaries for ubuntu 18.04 here, unpack them to /usr/bin/ and remove the dependencies on the debian packages from the ynh_mongo_db. Very dirty solution, I do not recommend to imitate

@MohamedElashri
Copy link

I tried to do what you suggested but did not manage to do that, can you offer some guide

I did the following

  1. Download and unpack mongo binaries into /usr/bin
cd /usr/bin 
sudo curl -O https://fastdl.mongodb.org/linux/mongodb-linux-aarch64-ubuntu1804-4.2.23.tgz && sudo tar -zxvf mongodb-linux-aarch64-ubuntu1804-4.2.23.tgz
  1. I renamed folder mongodb-linux-aarch64-ubuntu1804-4.2.23 to mongod
mv  mongodb-linux-aarch64-ubuntu1804-4.2.23 mongod
  1. Create systemd service manually

A. Create /etc/systemd/system/mongod.service

sudo nano /etc/systemd/system/mongod.service

Put this inside

[Unit]
Description=MongoDB Database Service
After=network.target

[Service]
User=root
Group=root
ExecStart=/usr/bin/mongod --config /etc/mongod.conf
PIDFile=/var/run/mongodb/mongod.pid
ExecReload=/bin/kill -s HUP $MAINPID
Restart=always

[Install]
WantedBy=multi-user.target

B. I reloaded the systemd daemon and enabled the mongod service to start automatically at boot time:

sudo systemctl daemon-reload
sudo systemctl enable mongod.service

C. start the mongod service:

sudo systemctl start mongod.service

Now you need to modify the dependencies

In scripts/ynh_mongo_db I replaced the following lines

MONGO_DEBIAN_DEPENDENCIES="mongodb mongodb-server mongo-tools"
MONGO_CE_DEPENDENCIES="mongodb-org mongodb-org-server mongodb-org-tools"

with those

MONGO_DEBIAN_DEPENDENCIES="mongodb-server mongo-tools"
MONGO_CE_DEPENDENCIES=""

But still getting problem with service mongod. Logs are here

@felixg3
Copy link

felixg3 commented Feb 20, 2023

Hmm, weird. But I also downloaded mongo-tools and mongodb-server from

https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/4.2/multiverse/binary-arm64/mongodb-org-mongos_4.2.23_arm64.deb

https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/4.2/multiverse/binary-arm64/mongodb-org-server_4.2.23_arm64.deb

https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/4.2/multiverse/binary-arm64/mongodb-org-tools_4.2.23_arm64.deb

So, installed are

mongodb-org-mongos/now 4.2.23 arm64 [installed,local]

mongodb-org-server/now 4.2.23 arm64 [installed,local]

mongodb-org-tools/now 4.2.23 arm64 [installed,local]

I did not manually enable a systemd-service at all. Try using the repo https://github.com/felixg3/overleaf_ynh for the installation at YNH and let me know if you are successful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants