「ローカル開発環境の構築がうまくいきません!!!!」
現在、私は学生でドットインストールをもとにプログラミングの勉強を始めました。
PHPの勉強をしたいのですがローカル環境が必要なことが分かり、ローカル環境を構築したいのですがパソコンに疎く、自分が書いたコードがウェブに反映されません。
大まかですが以下の手順で行いました。
VirtualBox →→Vagrant →→仮想マシンの立ち上げ →→PuTTY →→仮想マシンログイン →→Cyberduck
C:/user/MyVagrant/mycentos内のvagrantをコマンドプロンプトで立ち上げ、ssh接続で vagrant@dev.dotinstall.comにアクセスする。
WinSCPを立ち上げmycentosにログインする。
index.phpをhtmlディレクトリ内にアップロードする。
そのあと、添付ファイルのように進行させる。
発生している問題・エラーメッセージ
Cyberduck内にindex.phpのフォルダを作り、Atomで命令を書いてそれえをブラウザで確認したのですが、表示されませんでした。
そこで、レッスン内容を振り返ったのですが、vagrant up の時にエラーが出ていることが分かりました。
エラーメッセージ
PS C:\WINDOWS\system32\MyVagrant\MyCentOS> vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'bento/centos-6.8' is up to date...
==> default: Clearing any previously set forwarded ports...
There was an error while executing VBoxManage
, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["modifyvm", "6d5bfc5b-2bbd-42c1-8c72-2d0821945a60", "--natpf1", "delete", "ssh"]
Stderr: VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended info not available)
VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Write)" at line 529 of file VBoxManageModifyVM.cpp
###自分で行った対処
https://qiita.com/ndxbn/items/c7641f9c7dce796c1eda
こちらのサイトを参考に vagrant global-statusを行ったら、以下のように表示されました。
S C:\WINDOWS\system32\MyVagrant\MyCentOS> vagrant global-status
id name provider state directory
There are no active Vagrant environments on this computer! Or,
you haven't destroyed and recreated Vagrant environments that were
started with an older version of Vagrant
補足情報(FW/ツールのバージョンなど)
システム
windows10 64bit
vagrant 2.2.1
VirtualBox 5.2.22
すみません、数日間いろいろ調べ、試しましたが改善できませんでした。
皆さん、力を貸してください。分かりづらい文章になってしまいましたが、よろしくお願いします。