質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
CentOS

CentOSは、主にRed Hat Enterprise Linux(RHEL)をベースにした、フリーのソフトウェアオペレーティングシステムです。

Vagrant

Vagrantは、VirtualBox上の仮想マシンを コマンドラインから作成してくれるソフトウェアです。 ビルド環境など容易に構築が可能です。

Q&A

解決済

1回答

1914閲覧

【Vagrant】CentOS6.5をインストールできない

narururu

総合スコア172

CentOS

CentOSは、主にRed Hat Enterprise Linux(RHEL)をベースにした、フリーのソフトウェアオペレーティングシステムです。

Vagrant

Vagrantは、VirtualBox上の仮想マシンを コマンドラインから作成してくれるソフトウェアです。 ビルド環境など容易に構築が可能です。

0グッド

0クリップ

投稿2020/05/04 13:39

解決したい課題

Vagrant上でCentOS6.5をインストールしたい。

環境

windows10
Vagrant1.9.5

現状

以下エラーが表示され、解決できない。

==> box: Loading metadata for box 'https://app.vagrantup.com/nrel/boxes/CentOS-6.5-x86_64' The box you're adding has a name different from the name you requested. For boxes with metadata, you cannot override the name. If you're adding a box using `vagrant box add`, don't specify the `--name` parameter. If the box is being added via a Vagrantfile, change the `config.vm.box` value to match the name below. Requested name: centos65 Actual name: nrel/CentOS-6.5-x86_64

試したこと

①cmdで以下コマンドを実行

vagrant box add centos65 https://app.vagrantup.com/nrel/boxes/CentOS-6.5-x86_64

②実行後、以下エラーが表示される。

Vagrant failed to initialize at a very early stage: The plugins failed to initialize correctly. This may be due to manual modifications made within the Vagrant home directory. Vagrant can attempt to automatically correct this issue by running: vagrant plugin repair If Vagrant was recently updated, this error may be due to incompatible versions of dependencies. To fix this problem please remove and re-install all plugins. Vagrant can attempt to do this automatically by running: vagrant plugin expunge --reinstall Error message given during initialization: Unable to resolve dependency: user requested 'vagrant-vbguest (> 0)'

③以下コマンド実行

vagrant plugin expunge --reinstall

④以下が出力される。

This command permanently deletes all currently installed user plugins. It should only be used when a repair command is unable to properly fix the system. Continue? [N]: y All user installed plugins have been removed from this Vagrant environment! Vagrant will now attempt to reinstall user plugins that were removed. Installing the 'vagrant-vbguest' plugin. This can take a few minutes... Fetching: micromachine-3.0.0.gem (100%) Fetching: vagrant-vbguest-0.24.0.gem (100%) Installed the plugin 'vagrant-vbguest (0.24.0)'!

⑤再度、centos6.5をインストールコマンドを実行する。

vagrant box add centos65 https://app.vagrantup.com/nrel/boxes/CentOS-6.5-x86_64

⑥以下エラーが表示される。

==> box: Box file was not detected as metadata. Adding it directly... ==> box: Adding box 'centos65' (v0) for provider: box: Downloading: https://app.vagrantup.com/nrel/boxes/CentOS-6.5-x86_64 box: Progress: 0% (Rate: 0/s, Estimated time remaining: --:--:--) An error occurred while downloading the remote file. The error message, if any, is reproduced below. Please fix this error and try again. SSL certificate problem: self signed certificate in certificate chain More details here: http://curl.haxx.se/docs/sslcerts.html curl performs SSL certificate verification by default, using a "bundle" of Certificate Authority (CA) public keys (CA certs). If the default bundle file isn't adequate, you can specify an alternate file using the --cacert option. If this HTTPS server uses a certificate signed by a CA represented in the bundle, the certificate verification probably failed due to a problem with the certificate (it might be expired, or the name might not match the domain name in the URL). If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option.

⑦以下コマンド実行

vagrant up

⑧以下が出力される。

A Vagrant environment or target machine is required to run this command. Run `vagrant init` to create a new Vagrant environment. Or, get an ID of a target machine from `vagrant global-status` to run this command on. A final option is to change to a directory with a Vagrantfile and to try again.

⑨以下コマンド実行

vagrant init

⑩以下が出力される。

A `Vagrantfile` has been placed in this directory. You are now ready to `vagrant up` your first virtual environment! Please read the comments in the Vagrantfile as well as documentation on `vagrantup.com` for more information on using Vagrant.

⑪以下コマンド実行

vagrant up

⑪以下が出力される。

==> Provider 'virtualbox' not found. We'll automatically install it now... The installation process will start below. Human interaction may be required at some points. If you're uncomfortable with automatically installing this provider, you can safely Ctrl-C this process and install it manually. ==> Downloading VirtualBox 5.0.10... This may not be the latest version of VirtualBox, but it is a version that is known to work well. Over time, we'll update the version that is installed. Progress: 100% (Rate: 2781k/s, Estimated time remaining: --:--:--) ==> Installing VirtualBox. This will take a few minutes... A couple pop-ups will occur during this installation process to ask for admin privileges as well as to install Oracle drivers. Please say yes to both. If you're uncomfortable with this, please install VirtualBox manually. ==> VirtualBox has successfully been installed! Bringing machine 'default' up with 'hyperv' provider... ==> default: Verifying Hyper-V is enabled... The Hyper-V cmdlets for PowerShell are not available! Vagrant requires these to control Hyper-V. Please enable them in the "Windows Features" control panel and try again.

いつまでたっても解決できないです('_')
vagrant1.9.5ではcentos6.5をインストールすることができないのでしょうか。
どなたかご存知の方、ご教示いただけますでしょうか。
よろしくお願いいたします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

box名と指定したurlの不一致が原因です。
いずれかの方法で実行しましょう。(勉強のためにどちらのコマンドも実行してみるといいです)

1)URLを指定する方法

vagrant box add https://app.vagrantup.com/nrel/boxes/CentOS-6.5-x86_64

2)box名を指定する方法

vagrant box add nrel/CentOS-6.5-x86_64

投稿2020/05/04 19:50

yukky1201

総合スコア2751

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

narururu

2020/05/05 01:11 編集

いつもありがとうございます!yukky1201さん☺ 仰る通り、最初のエラー文からはbox名とurlの不一致と記載されておりますね! しかし、実際に1)を試したところ、⑥と同様のエラーが出てしまいました。 また、2)を試したところ、以下エラーになってしまいました。 C:\WINDOWS\system32>vagrant box add nrel/CentOS-6.5-x86_64 The box 'nrel/CentOS-6.5-x86_64' could not be found or could not be accessed in the remote catalog. If this is a private box on HashiCorp's Atlas, please verify you're logged in via `vagrant login`. Also, please double-check the name. The expanded URL and error message are shown below: URL: ["https://atlas.hashicorp.com/nrel/CentOS-6.5-x86_64"] Error: The requested URL returned error: 404 Not Found
narururu

2020/05/05 01:21

すいません! 先程PCのファイアウォールを無効化したら、上手くいきました!! アドバイスのおかげで前に進めることができました! 本当にありがとうございました!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問