@tomjay i'm just using an intel mac but have got my laravel sites using homestead, which uses vagrant.
Setting up Laravel on a M1 MacBook?
Has anyone found a good guide to setting up a Laravel development environment on a m1 Mac. I've had a look round and not really been able to find one.
Valet or better still vagrant.
Any suggestions greatly appreciated.
Thanks, my issue is I've got homestead and Laravel running on an old Mac fine, and am looking for how to migrate over to a M1 Mac if possible as at the moment seems like vagrant and a few other things can't run / won't run without a recompile for the newARM processors.
I'm following this with interest as i need to get new hardware in the next fortnight and am not sure if I'm best to go with Intel MBP (especially if theres not a reliable way to get homestead running on M1 yet)
@TomJay Hi mate i have a M1 Macbook pro and on my office a M1 Mac Mini both work great with Valet! Keep it clean and simple
Tighten has a nice guide: https://laravelm1.tighten.co/
Great thanks for this. II had a look, the guide has a lot of trial and error listed in it which is great to see the process, but I'm finding it a little confusing -- would be super it they'd made a summary "this is what you do" guide
I'm using Valet for nginx/php-fpm, and Ubuntu VMs under Parallels (https://b2b.parallels.com/apple-silicon) for database and storage.
Great, any tips or basic walkthrough what you did to get that going? I've never used Valet before always homestead. I've got parallels installed.
If you had a basic set up cheat cheat that would be an amazing post.
@tomjay what M1 did you get? i'm toying with getting one, now docker looks like its supported. Deciding whether to go 8GB or 16GB. Any feedback on that, you can share?
I went with a basic Air 512/8gb. Since I am not running docker/vagrant yet I can't comment how it handles emulation or serious loads. Apps load slow the first launch then very fast after that.
For general use it's really responsive I love it so far. The best thing for me is actually the new keyboard -- like an old school Mac, way less typos.
@tomjay why don't you use Laravel Sail? Nothing cleaner out there. I hear that docker is operational and it works better than on Intel macs for which they developed docker for years.
I might try it. This looks promising
Forgive my ignorance, but couldn't you do your development under MAMP, I think it runs on M1 macs and it's not particularly complicated.
@chiefguru whilst MAMP is okay for local development, it’s not really ideal if you want to snapshot and distribute a development environment if you are working on a shared project. Also if you have specific version needs for each project then this is harder to manage in MAMP than docker or homestead
HomeBrew has updated to 3.0 and it is compatible with M1 silicon mac now. Try reinstall Homebrew and i think it will be fine as before. (i don't have M1 mac so i didn't test)
But , you can also use built-in php and apache to setup a dev env, not too hard
I was able to set up a laravel valet dev environment on the M1 Macbook Air using docker preview and tighten/takeout.
However, I couldn't get xdebug to install. Anyone knows how to install xdebug on the M1 Mac? Or any other alternatives step debuger?
I'm currently working on an M1 with valet with 0 issues (though I migrated over from an intel mac when I got the new one, so all the old brew files etc were just copied over).
Did you run into any issues specifically, or is this more of a preventative question? :)
Hello try this.
How to install Laravel Valet in M1 Chip https://youtu.be/nH45-USlIQU
I keep getting this issue on m1 mac:
▶ brew postinstall [email protected] --debug
/opt/homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/[email protected]
==> Postinstalling [email protected]
Warning: The post-install step did not complete successfully
You can try again using:
brew postinstall [email protected]
==> An exception occurred within a child process:
Errno::EEXIST: File exists @ syserr_fail2_in - /opt/homebrew/Cellar/[email protected]/7.4.16/pecl
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:363:in `symlink'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:363:in `block in ln_s'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1573:in `fu_each_src_dest0'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:361:in `ln_s'
/opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/[email protected]:258:in `post_install'
/opt/homebrew/Library/Homebrew/formula.rb:1076:in `block (2 levels) in run_post_install'
/opt/homebrew/Library/Homebrew/formula.rb:918:in `with_logging'
/opt/homebrew/Library/Homebrew/formula.rb:1075:in `block in run_post_install'
/opt/homebrew/Library/Homebrew/utils.rb:550:in `with_env'
/opt/homebrew/Library/Homebrew/formula.rb:1064:in `run_post_install'
/opt/homebrew/Library/Homebrew/postinstall.rb:22:in `<main>'
Any idea how to fix this?
I found this and worked perfectly with laravel valet https://dev.to/ibrarturi/mac-m1-setup-for-local-development-with-laravel-valet-2lmk
For me, I opted for a M1 Mac mini with 16GB RAM. I've used docker for my development and the only issue was mysql support so we've switched to use mariadb. Other than that, I had issues with cypress testing so had to switch my terminal to use Rosetta and that seemed to resolve the issue.
For multi-domains docker and valet is not serious. I mean this way had been working for me - Parallel virtualization. But this license is not free. (Parallel) https://github.com/yodoware/homestead-arm64 and also I had deleted "type" for the attached folders from the parent OS. (Homestead.yaml)
From VirtualBox ARM M1 will never exist saids support. Don't hope and wait, only Parallel way.
Hello everyone. I come back. New released Laravel 9 and Homestead released new instruction too. I tried to install the default way from the documentation - https://laravel.com/docs/9.x/homestead for the ARM Apple silicon processor.
They wrote If you are using Apple Silicon, you should add box: laravel/homestead-arm to your Homestead.yaml file. Apple Silicon requires the Parallels provider.
but it doesn't work for me.
My old config is working good
ip: "192.168.3.3"
memory: 2048
cpus: 2
provider: parallels
box: yodoware/homestead-arm64
version: '>= 11.3.0'
name: armlaravel
My new config can't mount folders.
ip: "192.168.4.4"
memory: 2048
cpus: 2
provider: parallels
box: laravel/homestead-arm
name: armlaravel9
I don't have any idea why? Did anyone pass this way?
#Homestead git:(release) vagrant up
Bringing machine 'brothersprinting' up with 'parallels' provider...
.......
==> armlaravel9: Mounting shared folders...
armlaravel9: /vagrant => /Users/joker/websites/HomesteadArmLaravel9
Vagrant was unable to mount Parallels Desktop shared folders. This is usually
because the filesystem "prl_fs" is not available. This filesystem is
made available via the Parallels Tools and kernel module.
Please verify that these guest tools are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:
mount -t prl_fs -o uid=1000,gid=1000,_netdev vagrant /vagrant
The error output from the command was:
mount: /vagrant: unknown filesystem type 'prl_fs'.
I have done this situation. You should update everything for vagrant up also Parallel with Vagrant and Linux packages update. Laravel 9 Homestead is working well.
Please or to participate in this conversation.