Cannot get vagrant to install VM. (From "PHP & MySQL: Novice to Ninja, 6th"

Ran vagrant up. got “run vagrant provision” Then got these errors. The complete message list is included below.
-------error —
default: [Composer\Downloader\TransportException]
default: The “https://getcomposer.org/versions” file could not be downloaded: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution
default: failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution

---- complete messsages —
$ vagrant provision
==> default: Running provisioner: file…
default: C:/fool-server/aliases => ~/.bash_aliases
==> default: Running provisioner: shell…
default: Running: C:/Users/roger/AppData/Local/Temp/vagrant-shell20200515-7456-a0sheq.sh
==> default: Running provisioner: Creating Site: test2.app (shell)…
default: Running: script: Creating Site: test2.app
==> default: Running provisioner: Restarting Nginx (shell)…
default: Running: script: Restarting Nginx
==> default: Running provisioner: Creating MySQL Database: homestead (shell)…
default: Running: script: Creating MySQL Database: homestead
default: mysql:
default: [Warning] Using a password on the command line interface can be insecure.
==> default: Running provisioner: Creating Postgres Database: homestead (shell)…
default: Running: script: Creating Postgres Database: homestead
default: createdb:
default:
default: error:
default: database creation failed: ERROR: database “homestead” already exists
==> default: Running provisioner: Clear Variables (shell)…
default: Running: script: Clear Variables
==> default: Running provisioner: Update Composer (shell)…
default: Running: script: Update Composer
default: You are running composer as “root”, while “/home/vagrant/.composer” is owned by “vagrant”
default:
default: [Composer\Downloader\TransportException]
default: The “https://getcomposer.org/versions” file could not be downloaded: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution
default: failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution
default:
default: self-update [-r|–rollback] [–clean-backups] [–no-progress] [–update-keys] [–stable] [–preview] [–snapshot] [–1] [–2] [–set-channel-only] [–] []
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

Seems to be indicating your vagrant instance is having trouble reaching the internet, specifically in resolving the DNS for getcomposer.org.

I agree. And what do you suggest that I try to either fix it, or determine WHAT to fix??

Although I thought it might be a Composer problem. But, since I am a newbie to this, what do I know?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.