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

Installation fails with Ruby 2.7.1: /usr/bin/mkdir not found #822

Closed
dhs-rec opened this issue Aug 31, 2020 · 11 comments
Closed

Installation fails with Ruby 2.7.1: /usr/bin/mkdir not found #822

dhs-rec opened this issue Aug 31, 2020 · 11 comments

Comments

@dhs-rec
Copy link

dhs-rec commented Aug 31, 2020

After updating from Ruby 2.7.0 to 2.7.1 make install fails with the following message:

current directory: /usr/local/rvm/gems/ruby-2.7.1@MyGemset/gems/ffi-1.13.1/ext/ffi_c
make "DESTDIR=" install
make: /usr/bin/mkdir: Command not found
make: *** [Makefile:202: .sitearchdir.time] Error 127

make install failed, exit code 2

There is no /usr/bin/mkdir, just /bin/mkdir (system is Ubuntu 20.04, but checked on 18.04 and Debian 10, too)

@larskanis
Copy link
Member

/usr/bin/mkdir should be a symlink to /bin/mkdir on Ubuntu-20.04:

$ ls -l /usr/bin/mkdir 
lrwxrwxrwx 1 root root 10 Jun 12 10:21 /usr/bin/mkdir -> /bin/mkdir*

@dhs-rec
Copy link
Author

dhs-rec commented Aug 31, 2020

But it isn't. Not on 18.04, not on 20.04 and also not on Debian 10. I've also checked the coreutils package sources, and there's no sign that it should create a symlink. In fact, it explicitely moves mkdir (and other) binaries from /usr/bin to /bin, but that's all it does.

@larskanis
Copy link
Member

I guess that Ubuntu installs the symlink by some development package. Anyway ruby-ffi doesn't use any absolute references to mkdir. So the issue is probably somewhere else.

@dhs-rec
Copy link
Author

dhs-rec commented Aug 31, 2020

Yeah, maybe. May also be a Ruby issue, but I wasn't sure where to file it. It's working fine with Ruby 2.7.0, after all.

@dhs-rec
Copy link
Author

dhs-rec commented Sep 1, 2020

OK, found the reason. As you can see from the error message above, I am using RVM to setup Ruby gemsets. When I reinstalled Ruby 2.7.0 yesterday after running into the error with 2.7.1, I recognized that RVM actually compiled 2.7.0, which it didn't do when installing 2.7.1. So I reinstalled Ruby 2.7.1, forcing it to be compiled by passing --disable-binary and the error went away. I'll file an issue with RVM...

@dhs-rec dhs-rec closed this as completed Sep 1, 2020
@kenyon
Copy link

kenyon commented Dec 20, 2020

rvm/rvm#4975

@wanchic
Copy link

wanchic commented Feb 17, 2021

OK, found the reason. As you can see from the error message above, I am using RVM to setup Ruby gemsets. When I reinstalled Ruby 2.7.0 yesterday after running into the error with 2.7.1, I recognized that RVM actually compiled 2.7.0, which it didn't do when installing 2.7.1. So I reinstalled Ruby 2.7.1, forcing it to be compiled by passing --disable-binary and the error went away. I'll file an issue with RVM...

I was having multiple issues with Ruby 2.5, 2.6, & 2.7, with gem install rails 6.0 & 6.1. I'm using Ubuntu 20.04 and yes, I utilize RVM! using --disable-binary was the key to making rails gem install again. Thanks dhs-rec!

rvm remove 2.7.2 - make sure you don't have any gemsets you want to delete before doing this. It will erase the ruby version and all gemsets associated with it.

rvm install 2.7.2 --disable-binary
rvm use 2.7.2@new_gemset
gem install rails -v 6.1.2.1 --no-doc

No compile errors on racc after this.

@alexisdiaz008
Copy link

Can confirm, just ran into the same issue of rvm being unable to bundle with ruby 2.7.1 and rails 6.0.3 on ubuntu 18.04, disabling binary on rvm install worked, thank you!

@KitMurdock
Copy link

I ran into this issue on Ubuntu 20.04 with ruby 3.0.0 - disabling binary worked for me too. Thank you!

@aayestashn
Copy link

--disable-binary

Thank you

@DanSmaR
Copy link

DanSmaR commented Apr 16, 2024

Great, it worked here too

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

8 participants