今天继续装环境……前言提要,由于怎么都make不了,把lucid32换成precise32了。
add是没问题的:
$ vagrant box add precise32 E:/HashiCorp/precise32.box ==> box: Box file was not detected as metadata. Adding it directly… ==> box: Adding box ‘precise32’ (v0) for provider: box: Unpacking necessary files from: file:///E:/HashiCorp/precise32.box box: ==> box: Successfully added box ‘precise32’ (v0) for ‘virtualbox’!
执行
vagrant init vagrant up
出现
$ vagrant up Bringing machine ‘default’ up with ‘virtualbox’ provider… ==> default: Box ‘base’ could not be found. Attempting to find and install… default: Box Provider: virtualbox default: Box Version: >= 0 ==> default: Box file was not detected as metadata. Adding it directly… ==> default: Adding box ‘base’ (v0) for provider: virtualbox default: Downloading: base default: An error occurred while downloading the remote file. The error message, if any, is reproduced below. Please fix this error and try again.
Couldn’t open file /E:/precise32/base
换成命令
vagrant init hashicorp/precise32
再次
$ vagrant up Bringing machine ‘default’ up with ‘virtualbox’ provider… ==> default: Box ‘hashicorp/precise32’ could not be found. Attempting to find and install… default: Box Provider: virtualbox default: Box Version: >= 0 ==> default: Loading metadata for box ‘hashicorp/precise32’ default: URL: https://atlas.hashicorp.com/hashicorp/precise32 ==> default: Adding box ‘hashicorp/precise32’ (v1.0.0) for provider: virtualbox default: Downloading: https://atlas.hashicorp.com/hashicorp/boxes/precise32/versions/1.0.0/providers/virtualbox.box default: An error occurred while downloading the remote file. The error message, if any, is reproduced below. Please fix this error and try again.
Unknown SSL protocol error in connection to hashicorp-files.hashicorp.com:443
找了下很多人都有这个问题。
https://techythought.wordpress.com/2016/04/11/vagrant-error-failed-to-connect-to-atlas-hashicorp-com/ https://github.com/mitchellh/vagrant/issues/3586 解决方案让用代理。
连忙搞了个shadowsocks,设置全局代理搞定。
$ vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Importing base box 'precise32'... ==> default: Matching MAC address for NAT networking... ==> default: Setting the name of the VM: 44465_default_1489070710386_38685 ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat ==> default: Forwarding ports... default: 22 (guest) => 2222 (host) (adapter 1) ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2222 default: SSH username: vagrant default: SSH auth method: private key default: default: Vagrant insecure key detected. Vagrant will automatically replace default: this with a newly generated keypair for better security. default: default: Inserting generated public key within guest... default: Removing insecure key from the guest if it's present... default: Key inserted! Disconnecting and reconnecting using new SSH key... ==> default: Machine booted and ready! ==> default: Checking for guest additions in VM... default: The guest additions on this VM do not match the installed version of default: VirtualBox! In most cases this is fine, but in rare cases it can default: prevent things such as shared folders from working properly. If you see default: shared folder errors, please make sure the guest additions within the default: virtual machine match the version of VirtualBox you have installed on default: your host and reload your VM. default: default: Guest Additions Version: 4.2.0 default: VirtualBox Version: 5.1 ==> default: Mounting shared folders... default: /vagrant => E:/Cygwin/home/44465好像还是有点问题……不管了,先试试能不能继续- -
这次安装make成功了!
vagrant@precise32:/vagrant$ sudo apt-get install make Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: make-doc The following NEW packages will be installed: make 0 upgraded, 1 newly installed, 0 to remove and 66 not upgraded. Need to get 116 kB of archives. After this operation, 319 kB of additional disk space will be used. Get:1 http://us.archive.ubuntu.com/ubuntu/ precise/main make i386 3.81-8.1ubuntu1 [116 kB] Fetched 116 kB in 3s (31.3 kB/s) Selecting previously unselected package make. (Reading database ... 29361 files and directories currently installed.) Unpacking make (from .../make_3.81-8.1ubuntu1_i386.deb) ... Processing triggers for man-db ... Setting up make (3.81-8.1ubuntu1) ...但是Chap2的两个命令都执行不了
vagrant@precise32:/vagrant$ make all make: *** No rule to make target `all'. Stop. vagrant@precise32:/vagrant$ make run make: *** No rule to make target `run'. Stop.Dunno why.
不管了,貌似也是要用到qemu的,自己先装一下。
$ sudo apt-get install qemuREF: https://www.ibm.com/developerworks/community/blogs/5144904d-5d75-45ed-9d2b-cf1754ee936a/entry/qemu1_%e4%bd%bf%e7%94%a8qemu%e5%88%9b%e5%bb%ba%e8%99%9a%e6%8b%9f%e6%9c%ba?lang=en
又跟昨天差不多,貌似由于域名迁移有些文件下载不了。
继续漫长的斗争。。。
$ sudo apt-get update用了全局代理果然好很多,update没报错。 安装qemu也很顺利。但还是没办法运行那两个命令,囧。
暂且准备到此…