Vagrant - 환경 구축 Error(Mac 환경)

6950 단어

Vagrant-환경 구축 Error-Mac 환경

  • Error1️⃣
  • Vagrant up 시 error 화면
  • 해결
  • Error2️⃣
  • Vagrant ssh의 error 화면입니다
  • 문제 확인
  • 해결
  • 확인

  • Error1️⃣


    Vagrant up 시 error 화면

    ~/work/sample-vagrant $ vagrant up
    Bringing machine 'default' up with 'virtualbox' provider...
    ==> default: Importing base box 'centos/7'...
    ==> default: Matching MAC address for NAT networking...
    ==> default: Checking if box 'centos/7' version '1905.1' is up to date...
    ==> default: Setting the name of the VM: sample-vagrant_default_1569332644627_82660
    ==> default: Clearing any previously set network interfaces...
    There was an error while executing `VBoxManage`, a CLI used by Vagrant
    for controlling VirtualBox. The command and stderr is shown below.
    
    Command: ["hostonlyif", "create"]
    
    Stderr: 0%...
    Progress state: NS_ERROR_FAILURE
    VBoxManage: error: Failed to create the host-only adapter
    VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
    VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
    VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 94 of file VBoxManageHostonly.cpp
    
    

    해결하다


    virtualbox 다시 시작
    ~/work/sample-vagrant $ sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
    Password:
    Unloading VBoxDrv.kext
    Loading VBoxDrv.kext
    Loading VBoxUSB.kext
    Loading VBoxNetFlt.kext
    Loading VBoxNetAdp.kext
    ~/work/sample-vagrant $
    

    결과는 정상virtual up입니다.

    Error2️⃣


    Vagrant ssh의 error 화면

    ~/work/sample-vagrant $ vagrant ssh
    -bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
    

    문제 확인


    UTC 시간 표시
    [vagrant@vagrantCentos1 locales]$ echo $LANG
    en_US.UTF-8
    [vagrant@vagrantCentos1 locales]$ date
    Tue Sep 24 14:28:41 UTC 2019
    

    해결하다

    [vagrant@vagrantCentos1 locales]$ localectl set-locale LANG=ja_JP.UTF-8
    ==== AUTHENTICATING FOR org.freedesktop.locale1.set-locale ===
    Authentication is required to set the system locale.
    Authenticating as: root
    Password:
    ==== AUTHENTICATION COMPLETE ===
    

    확인

    [root@vagrantCentos1 ~]# locale
    LANG=ja_JP.UTF-8
    LC_CTYPE="ja_JP.UTF-8"
    LC_NUMERIC="ja_JP.UTF-8"
    LC_TIME="ja_JP.UTF-8"
    LC_COLLATE="ja_JP.UTF-8"
    LC_MONETARY="ja_JP.UTF-8"
    LC_MESSAGES="ja_JP.UTF-8"
    LC_PAPER="ja_JP.UTF-8"
    LC_NAME="ja_JP.UTF-8"
    LC_ADDRESS="ja_JP.UTF-8"
    LC_TELEPHONE="ja_JP.UTF-8"
    LC_MEASUREMENT="ja_JP.UTF-8"
    LC_IDENTIFICATION="ja_JP.UTF-8"
    LC_ALL=
    [root@vagrantCentos1 ~]# date
    2019   9  24    14:33:13 UTC
    [root@vagrantCentos1 ~]# localectl list-locales | grep -i ja
    ja_JP.utf8
    [root@vagrantCentos1 ~]# echo $LANG
    ja_JP.UTF-8
    

    좋은 웹페이지 즐겨찾기