LoginSignup
16
11

More than 5 years have passed since last update.

Vagrant up ができなかったバカな僕へ(超初歩的)

Last updated at Posted at 2015-07-12

いつも通り
vagrant up をやろうと思ったらできなかった。
terminal が言ってきた原因はこう


Bringing machine 'default' up with 'virtualbox' provider...
Vagrant cannot forward the specified ports on this VM, since they
would collide with some other application that is already listening
on these ports. The forwarded port to 2222 is already in use
on the host machine.

To fix this, modify your current projects Vagrantfile to use another
port. Example, where '1234' would be replaced by a unique host port:

  config.vm.network :forwarded_port, guest: 22, host: 1234

Sometimes, Vagrant will attempt to auto-correct this for you. In this
case, Vagrant was unable to. This is usually because the guest machine
is in a state which doesn't allow modifying port forwarding.
Kang-no-MacBook-Air:kang kangyoosam$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
Vagrant cannot forward the specified ports on this VM, since they
would collide with some other application that is already listening
on these ports. The forwarded port to 2222 is already in use
on the host machine.

To fix this, modify your current projects Vagrantfile to use another
port. Example, where '1234' would be replaced by a unique host port:

  config.vm.network :forwarded_port, guest: 22, host: 1234

Sometimes, Vagrant will attempt to auto-correct this for you. In this
case, Vagrant was unable to. This is usually because the guest machine
is in a state which doesn't allow modifying port forwarding.

要約すると、他の場所すでにvagrantが立ち上がってたらしい(vagrant up されてたらしい)。

history で履歴をみると、たしかにvagrant upやってた!(記憶にはない)
僕の場合はホーム画面でvagrant up してしまってたので、home に行って、vagrant suspend(vagrant をストップする)をしたら解決した。

16
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
16
11