ptwobrussell / Mining-the-Social-Web-2nd-Edition

The official online compendium for Mining the Social Web, 2nd Edition (O'Reilly, 2013)
http://bit.ly/135dHfs
Other
2.9k stars 1.49k forks source link

Cant have Chef to successfully finish installing packages. #245

Closed cerealkill closed 9 years ago

cerealkill commented 9 years ago

Hi, I followed the instructions to clone your repo and run the vagrant vm. As it started Chef scripts ran and couldnt find python at /bin/ṕython. Then I sshed into the vm and created an softlink for it in that folder. Afterwards it stopped (as it seems) at trying to install Numpy. Could you please help me? I bumped the console output over here (https://drive.google.com/file/d/0BxkBT1UfVsGLVFh1NXp0RmhnZTQ/view?usp=sharing) so you or anyone could check. Im working at Linux version 3.2.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.2.63-2+deb7u1 and have the latest vagrant version intalled.

jhh commented 9 years ago

I'm seeing the exact same issue, last few lines of installation log included below. Fresh install of VirtualBox and Vagrant, host is Windows 7 Enterprise.

Edit: looks like duplicate of #243

==> default: /opt/chef/embedded/apps/chef/lib/chef/application/solo.rb:224:in `run_application'
==> default: /opt/chef/embedded/apps/chef/lib/chef/application.rb:58:in `run'
==> default: /opt/chef/embedded/apps/chef/bin/chef-solo:25:in `<top (required)>'
==> default: /usr/bin/chef-solo:40:in `load'
==> default: /usr/bin/chef-solo:40:in `<main>'
==> default: [2014-12-16T14:41:05+00:00] ERROR: execute[install-setuptools (python::pip line 48) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '127'
==> default: ---- Begin output of   /bin/python ez_setup.py
==> default:  ----
==> default: STDOUT:
==> default: STDERR: sh: 1: /bin/python: not found
==> default: ---- End output of   /bin/python ez_setup.py
==> default:  ----
==> default: Ran   /bin/python ez_setup.py
==> default:  returned 127
==> default: [2014-12-16T14:41:05+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the output above. Please fix your recipes so that they properly complete.
ptwobrussell commented 9 years ago

Guys - I'm really sorry that this is giving you so many problems. For the most part the Vagrant-based VM has worked out really well for about 99/100 people but there is always something that doesn't quite work as expected in some environments. Sometimes it's related to software versions of Vagrant or Virtualbox and sometimes it's related to networking configuration.

For what it's worth, I have some time blocked off later this month to dust of the VM configuration, and I have some ideas that might simplify things a bit. I realize that doesn't help you this very minute, and I'll do my best to look at your logs and share some thoughts later today.

On Tue, Dec 16, 2014 at 8:51 AM, Jeff Hutchison notifications@github.com wrote:

I'm seeing the exact same issue, last few lines of installation log included below.

==> default: /opt/chef/embedded/apps/chef/lib/chef/application/solo.rb:224:in run_application' ==> default: /opt/chef/embedded/apps/chef/lib/chef/application.rb:58:inrun' ==> default: /opt/chef/embedded/apps/chef/bin/chef-solo:25:in <top (required)>' ==> default: /usr/bin/chef-solo:40:inload' ==> default: /usr/bin/chef-solo:40:in `

' ==> default: [2014-12-16T14:41:05+00:00] ERROR: execute[install-setuptools (python::pip line 48) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '127' ==> default: ---- Begin output of /bin/python ez_setup.py ==> default: ---- ==> default: STDOUT: ==> default: STDERR: sh: 1: /bin/python: not found ==> default: ---- End output of /bin/python ez_setup.py ==> default: ---- ==> default: Ran /bin/python ez_setup.py ==> default: returned 127 ==> default: [2014-12-16T14:41:05+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1) Chef never successfully completed! Any errors should be visible in the output above. Please fix your recipes so that they properly complete.

— Reply to this email directly or view it on GitHub https://github.com/ptwobrussell/Mining-the-Social-Web-2nd-Edition/issues/245#issuecomment-67169958 .

cerealkill commented 9 years ago

Thanks mr. Russel, I follow what you mean by Vagrant and Virtualbox versions and I did purge the versions installed from the Debian repo and intalled both the latest version from their official websites. Even though I ended having troubles, but different console outputs. Thinking from a developer logic it doesnt make much sense if not by network or guest-additions conflicts. As I told you at issue #243 it worked just as is in my Ubuntu box.

pfisterer commented 9 years ago

I have the same issue as jhh with Vagrant and Virtualbox on Mac OS Yosemite.

LeonardoReyes commented 9 years ago

Same here :(, I am also running MAC OS Yosemite. I am trying to update the vagrant box using the ubuntu updater. I will report back if it worked.

pfisterer commented 9 years ago

The solution from the first post of issue #243 worked for me ( running "vagrant ssh" then "sudo ln -s /usr/bin/python /bin/python", and finally "provision").

LeonardoReyes commented 9 years ago

Hi, yes it worked for me too, though I needed to run "vagrant reload" before "vagrant provision"

Thanks!

ejovi commented 9 years ago

Not working for me. Is there a solution?

richardconrad commented 9 years ago

Could someone please provide the equivalent solution for Windows?

ptwobrussell commented 9 years ago

@richardconrad @ejovi - See the comment at https://github.com/ptwobrussell/Mining-the-Social-Web-2nd-Edition/issues/243#issuecomment-70094461 - I'm having a hard time understanding how this has anything at all to do with the host operating system. It appears to me that perhaps the Vagrant box changed recently (or perhaps apt-get recently updated where it installs python) and the python binary isn't where Chef is expecting it to be. I think #243 should be a suitable workaround until I update the Chef recipe to take this into account.

richardconrad commented 9 years ago

I haven't tried this. I'm about to; but I just wanted to say thank you very much for replying and trying to help. It's much appreciated. Cheers, Richard ----Original message---- From : notifications@github.com Date : 15/01/2015 - 14:46 (GMTST) To : Mining-the-Social-Web-2nd-Edition@noreply.github.com Cc : richardconrad@btinternet.com Subject : Re: [Mining-the-Social-Web-2nd-Edition] Cant have Chef to successfully finish installing packages. (#245) @richardconrad @ejovi - See the comment at #243 (comment) - I'm having a hard time understanding how this has anything at all to do with the host operating system. It appears to me that perhaps the Vagrant box changed recently (or perhaps apt-get recently updated where it installs python) and the python binary isn't where Chef is expecting it to be. I think #243 should be a suitable workaround until I update the Chef recipe to take this into account. — Reply to this email directly or view it on GitHub.

richardconrad commented 9 years ago

Hi Matthew, But the problem I have is that I'm on Windows and these are Unix commands. I do have cygwin installed but there's no 'sudo' there (there is, however, a 'su.exe'. Should I try using that instead of sudo?). I did see the error message indicating vagrant expected to find '\bin\python' and tried renaming my Python27 directory so that I now have a \bin\python' but that didn't work. can you suggest anything, please? Cheers, Richard ----Original message---- From : notifications@github.com Date : 15/01/2015 - 14:46 (GMTST) To : Mining-the-Social-Web-2nd-Edition@noreply.github.com Cc : richardconrad@btinternet.com Subject : Re: [Mining-the-Social-Web-2nd-Edition] Cant have Chef to successfully finish installing packages. (#245) @richardconrad @ejovi - See the comment at #243 (comment) - I'm having a hard time understanding how this has anything at all to do with the host operating system. It appears to me that perhaps the Vagrant box changed recently (or perhaps apt-get recently updated where it installs python) and the python binary isn't where Chef is expecting it to be. I think #243 should be a suitable workaround until I update the Chef recipe to take this into account. — Reply to this email directly or view it on GitHub.

ptwobrussell commented 9 years ago

Are you following along with the video from the quick start guide or taking a different approach? Your host machine may be a Windows machine but your guest machine (the VM running via Vagrant) is a Linux machine. "vagrant ssh" from your host machine logs you into your guest (Linux) machine.

On Thu, Jan 15, 2015 at 11:20 AM, richardconrad notifications@github.com wrote:

Hi Matthew, But the problem I have is that I'm on Windows and these are Unix commands. I do have cygwin installed but there's no 'sudo' there (there is, however, a 'su.exe'. Should I try using that instead of sudo?). I did see the error message indicating vagrant expected to find '\bin\python' and tried renaming my Python27 directory so that I now have a \bin\python' but that didn't work. can you suggest anything, please? Cheers, Richard ----Original message---- From : notifications@github.com Date : 15/01/2015 - 14:46 (GMTST) To : Mining-the-Social-Web-2nd-Edition@noreply.github.com Cc : richardconrad@btinternet.com Subject : Re: [Mining-the-Social-Web-2nd-Edition] Cant have Chef to successfully finish installing packages. (#245) @richardconrad @ejovi - See the comment at #243 (comment) - I'm having a hard time understanding how this has anything at all to do with the host operating system. It appears to me that perhaps the Vagrant box changed recently (or perhaps apt-get recently updated where it installs python) and the python binary isn't where Chef is expecting it to be. I think #243 should be a suitable workaround until I update the Chef recipe to take this into account. — Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/ptwobrussell/Mining-the-Social-Web-2nd-Edition/issues/245#issuecomment-70123589 .

cerealkill commented 9 years ago

I changed the OS to ubuntu but still had to run vangrant up [chef never succesfully..] then vgrant destroy then vagrant up multiple times until it finally worked out. I had other vagrant projects that gave me the same issue and I figured it has to do with discrete problems in the repos network. Well thank all for the support and happy Mining! ;)