[SERVER-45021] Linuxbrew: Installed binaries are not executable Created: 09/Dec/19  Updated: 04/Jan/20  Resolved: 02/Jan/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Mathew Robinson (Inactive) Assignee: Mathew Robinson (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Sprint: Dev Platform 2020-01-13
Participants:

 Description   

Original Github Issue submitted by @n-se

The installed binaries are not executable by default which results in a permission denied error. Other homebrew package binaries are executable.
Environment details: Debian GNU/Linux 9.11 (stretch)
Brew version: 2.1.11-98-g1e584f9 (current latest master)

user@pc:~$ mongod
bash: /usr/home/user/.linuxbrew/bin/mongod: Permission denied

user@pc:~$ ls -la /usr/home/user/.linuxbrew/bin/mongod
lrwxrwxrwx 1 user user 44 Sep 20 09:23 /usr/home/user/.linuxbrew/bin/mongod -> ../Cellar/mongodb-community/4.2.0/bin/mongod

user@pc:~/.linuxbrew/Cellar/mongodb-community/4.2.0/bin$ ls -la
total 278884
drwxr-xr-x 2 user user     4096 Sep 20 09:23 .
drwxr-xr-x 4 user user     4096 Sep 20 09:23 ..
-r--r--r-- 1 user user 10007288 Aug  9 07:04 bsondump
-r-xr-xr-x 1 user user     7700 Aug  9 07:40 install_compass
-r--r--r-- 1 user user 46967016 Aug  9 07:17 mongo
-r--r--r-- 1 user user 72172612 Aug  9 07:40 mongod
-r--r--r-- 1 user user 14524964 Aug  9 07:04 mongodump
-r--r--r-- 1 user user 14273316 Aug  9 07:04 mongoexport
-r--r--r-- 1 user user 14230012 Aug  9 07:04 mongofiles
-r--r--r-- 1 user user 14445468 Aug  9 07:04 mongoimport
-r--r--r-- 1 user user 17626204 Aug  9 07:04 mongoreplay
-r--r--r-- 1 user user 14839772 Aug  9 07:04 mongorestore
-r--r--r-- 1 user user 38379304 Aug  9 07:26 mongos
-r--r--r-- 1 user user 14019372 Aug  9 07:04 mongostat
-r--r--r-- 1 user user 13690636 Aug  9 07:04 mongotop



 Comments   
Comment by Mathew Robinson (Inactive) [ 02/Jan/20 ]

Closing this as Won't Fix, it seems that Linuxbrew is a very small subset of homebrew users and we support from source builds as well as Linux packages for all distributions we support.

In the case of Linuxbrew it would just be a way to run our from source builds that we already document how to do.

Comment by Mathew Robinson (Inactive) [ 09/Dec/19 ]

Moved from: https://github.com/mongodb/homebrew-brew/issues/21

Comment by Mathew Robinson (Inactive) [ 09/Dec/19 ]

Original comment from Github Issue by @ekremkaraca

I have same issue here. With recent update of linuxbrew, mongodb formulae was removed. If I give permission to mongod with:

# echo $LINUXBREW_HOME returns /home/linuxbrew/.linuxbrew
chmod +x $LINUXBREW_HOME/Cellar/mongodb-community/4.2.1/bin/mongod

then I got another error like below:

❯ mongod --config /home/linuxbrew/.linuxbrew/etc/mongod.conf        
zsh: exec format error: mongod

It seems it's time to make it fixed soon.

Comment by Mathew Robinson (Inactive) [ 09/Dec/19 ]

Original comment from Github Issue by @chasinglogic

@n-se This isn't a priority for us at this moment. We aren't opposed to supporting Linuxbrew but we don't currently have the resources to dedicate to making it.

If you would like to implement the support and submit a PR we'd be happy to review it.

Comment by Mathew Robinson (Inactive) [ 09/Dec/19 ]

Original comment from Github Issue by @n-se

Any updates on this?

Comment by Mathew Robinson (Inactive) [ 09/Dec/19 ]

Original comment from Github Issue by @n-se

You probably do not use Linuxbrew if you have root access. Linuxbrew is more interesting for things like webhosting with SSH access or on a linux terminal server.

Comment by Mathew Robinson (Inactive) [ 09/Dec/19 ]

Original comment from Github Issue by @chasinglogic

We're discussing this internally. We haven't considered supporting linuxbrew up to this point. The problem with simply adding "chmod 0755" or some other equivalent in the Formula is that what you have downloaded there are MacOS binaries and so would not work even if they were executable.

We no longer build generic Linux binaries due to problems with openssl and so would effectively require that all users of Linuxbrew would have to compile MongoDB every time they upgraded (including minor versions) or installed it.

As a stop gap while we discuss this, if you're on a supported linux distribution, we provide repositories that have every supported version of mongodb available in your distributions preferred package manager / format.

Generated at Thu Feb 08 05:07:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.