The box 'ubuntu/xenial64' could not be found or could not be accessed in the remote catalog.


问题描述

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/xenial64' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
The box 'ubuntu/xenial64' 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/ubuntu/xenial64"]
Error: The requested URL returned error: 404 Not Found

解决方法

Vagrantfile文件中, 添加Vagrant::DEFAULT_SERVER_URL.replace('https://vagrantcloud.com')即可.

$ vagrant up                                                              1 ↵
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/xenial64' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'ubuntu/xenial64'
    default: URL: https://vagrantcloud.com/ubuntu/xenial64
==> default: Adding box 'ubuntu/xenial64' (v20180504.0.0) for provider: virtualbox
    default: Downloading: https://vagrantcloud.com/ubuntu/boxes/xenial64/versions/20180504.0.0/providers/virtualbox.box
    default: Progress: 76% (Rate: 6684k/s, Estimated time remaining: 0:00:12)
    ...

$ vagrant box list
ubuntu/xenial64 (virtualbox, 20180504.0.0)

参考文档


Author: Itaken
Reprint policy: All articles in this blog are used except for special statements CC BY 4.0 reprint polocy. If reproduced, please indicate source Itaken !
  TOC目录