magento2-vagrant-for-developers icon indicating copy to clipboard operation
magento2-vagrant-for-developers copied to clipboard

vagrant script not able to install magento

Open nwlshop9 opened this issue 7 years ago • 12 comments

window10, can verify all listed require software are installed init_project can successfully completed

however during the script on I get

Directory '/var/www/magento2ce' was not mounted as expected and Magento code base is not accessibl e on the guest machine. If your host is OSX or *nix, please make sure that Vagrant is able to mount NFS shares on your environment (see htt ps://github.com/paliarush/magento2-vagrant-for-developers/issues/88#issuecomment-254854019 )


chmod: cannot access ‘bin/magento’: No such file or directory [2017-09-06 20:55:13] > ./bin/magento setup:install --db-host=localhost --db-name=magento --db-user=root --backend-frontname=admin --base-url=http://magento2.vagrant144/ --language=en_US --timezone=America/Chicago --currency=USD --admin-lastname=Admin --admin-firstname=Admin [email protected] --admin- user=admin --admin-password=123123q --cleanup-database --use-rewrites=1 [/vagrant/scripts/guest/m-reinstall] [2017-09-06 20:55:13] > Magento installation failed. [/vagrant/scripts/guest/m-reinstall]


bash m-reinstall gives same error as above i can verify magento2ce folder and files exist and set to accessible by all users I also ran git.bash in admin privilege

nwlshop9 avatar Sep 06 '17 21:09 nwlshop9

[2017-09-13 21:00:50] STATUS: Installing/re-installing Magento [/vagrant/scripts/guest/m-reinstall]]

[2017-09-13 21:00:50] STATUS: > Removing Magento configuration files (env.php and config.php) [/vagrant/scripts/guest/m-reinstall]]

[2017-09-13 21:00:50] STATUS: > Clearing Magento cache [/vagrant/scripts/guest/m-clear-cache]]

[2017-09-13 21:00:50] STATUS: > Clearing directories containing temporary files [/vagrant/scripts/guest/m-clear-cache]]

[2017-09-13 21:00:50] STATUS: > Dropping and creating 'magento' DB [/vagrant/scripts/guest/m-reinstall]]

[2017-09-13 21:00:50] STATUS: > Dropping and creating 'magento_integration_tests' DB [/vagrant/scripts/guest/m-reinstall]]

[2017-09-13 21:00:50] STATUS: > ./bin/magento setup:install --db-host=localhost --db-name=magento --db-user=root --backend-frontname=admin --base-url=http://magento2.vagrant134/ --language=en_US --timezone=America/Chicago --currency=USD --admin-lastname=Admin --admin-firstname=Admin [email protected] --admin-user=admin --admin-password=123123q --cleanup-database --use-rewrites=1 [/vagrant/scripts/guest/m-reinstall]]

Could not open input file: ./bin/magento

[2017-09-13 21:00:50] ERROR: > Magento installation failed. [/vagrant/scripts/guest/m-reinstall]]

[2017-09-13 17:00:55] INFO: > [mSee details in /c/software/magento/vagrant-magento/log/m-reinstall.log[m. For debug output set debug:vagrant_project[m to 1[m in etc/config.yaml[m [./m-reinstall]]

here is m-reinstall log

nwlshop9 avatar Sep 13 '17 21:09 nwlshop9

Do you have PhpStorm running? On Windows environment it is used for uploading code base from your host to the guest. I saw installation on Windows working for someone just yesterday.

There should be no need to run anything with admin privileges. Try to log in to the guest and chmod 777 -R \var\www\magento2ce

paliarush avatar Sep 26 '17 16:09 paliarush

I have just tried installing the project with default config.yaml (it is automatically created out of config.yaml.dist) on Windows 10 and everything worked for me. I have VirtualBox 5.1.3 there, git 2.9.3.windows1, Vagrant 1.8.5.

Please try installing same versions of required software, or provide me your versions so I can try to reproduce the issue. Thanks

paliarush avatar Oct 29 '17 04:10 paliarush

I have the same problem. I have VirtualBox 5.2.12 vagrant 2.1.2 git version 2.18.0.windows.1 windows 10 Pro

I don't have PhpStorm running

maxi032 avatar Aug 13 '18 14:08 maxi032

@maxi032 thank you for reporting the issue. Unfortunately I don't have access to the Windows environment, but there are community members who might be able to help.

paliarush avatar Aug 13 '18 15:08 paliarush

I have the same issue on windows10

Hamsa1991 avatar Aug 14 '18 19:08 Hamsa1991

If somebody figures out how to fix this, please share with others.

paliarush avatar Aug 14 '18 20:08 paliarush

The solution for me was adding: config.vm.synced_folder host_magento_dir, guest_magento_dir

in this section

if use_nfs_for_synced_folders guest_magento_dir = host_magento_dir config.vm.synced_folder host_magento_dir, guest_magento_dir, type: "nfs", create: true else guest_magento_dir = '/var/www/magento2ce' config.vm.synced_folder host_magento_dir, guest_magento_dir config.vm.synced_folder host_magento_dir + '/var', guest_magento_dir + '/var', create: true config.vm.synced_folder host_magento_dir + '/generated', guest_magento_dir + '/generated', create: true config.vm.synced_folder host_magento_dir + '/app/etc', guest_magento_dir + '/app/etc', create: true

end

Hamsa1991 avatar Aug 15 '18 18:08 Hamsa1991

The solution for me was adding: config.vm.synced_folder host_magento_dir, guest_magento_dir

in this section

if use_nfs_for_synced_folders guest_magento_dir = host_magento_dir config.vm.synced_folder host_magento_dir, guest_magento_dir, type: "nfs", create: true else guest_magento_dir = '/var/www/magento2ce' config.vm.synced_folder host_magento_dir, guest_magento_dir config.vm.synced_folder host_magento_dir + '/var', guest_magento_dir + '/var', create: true config.vm.synced_folder host_magento_dir + '/generated', guest_magento_dir + '/generated', create: true config.vm.synced_folder host_magento_dir + '/app/etc', guest_magento_dir + '/app/etc', create: true

end

This worked for me too. Thank you @Hamsa1991 !!

santrobusweo avatar Sep 25 '18 17:09 santrobusweo

I am confused! in what file did you add this code? Thanks!

NickCorl avatar Oct 30 '18 16:10 NickCorl

I am confused! in what file did you add this code? Thanks!

Never mind, I found it. It is in the vagrant file

NickCorl avatar Oct 30 '18 16:10 NickCorl

In vagrant file

On Tue, 30 Oct 2018, 18:42 Nicholas Corl, [email protected] wrote:

I am confused! in what file did you add this code? Thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/paliarush/magento2-vagrant-for-developers/issues/146#issuecomment-434376111, or mute the thread https://github.com/notifications/unsubscribe-auth/AKYgEwkuXlM4_Jdhl3pdZExdZtvTul7qks5uqIFjgaJpZM4PO-f9 .

Hamsa1991 avatar Oct 30 '18 16:10 Hamsa1991