Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem on Ubuntu Server 15.04 64-bit #21

Closed
n8gard opened this issue Aug 11, 2015 · 4 comments
Closed

Problem on Ubuntu Server 15.04 64-bit #21

n8gard opened this issue Aug 11, 2015 · 4 comments

Comments

@n8gard
Copy link

n8gard commented Aug 11, 2015

I hooked in the 'wal-e::default' recipe into a cookbook that is successfully configuring PostgreSQL 9.4 on Ubuntu Server 15.04. Output is below. Is this possibly a platform problem or is it possible I've not done something that is required?

<snip>
cb-dbtest01 Recipe: postgresql::contrib
cb-dbtest01   * apt_package[postgresql-contrib-9.4] action install (up to date)
cb-dbtest01 Recipe: wal-e::default
cb-dbtest01   * apt_package[daemontools] action install (up to date)
cb-dbtest01   * apt_package[libevent-dev] action install (up to date)
cb-dbtest01   * apt_package[libxslt-dev] action install (up to date)
cb-dbtest01   * apt_package[lzop] action install (up to date)
cb-dbtest01   * apt_package[postgresql-client] action install (up to date)
cb-dbtest01   * apt_package[pv] action install (up to date)
cb-dbtest01   * apt_package[python-dev] action install (up to date)
cb-dbtest01   * apt_package[python-setuptools] action install (up to date)
cb-dbtest01   * apt_package[git] action install (up to date)
cb-dbtest01 Recipe: python::pip
cb-dbtest01   * cookbook_file[/var/chef/cache/get-pip.py] action create (skipped due to not_if)
cb-dbtest01   * execute[install-pip] action run (skipped due to not_if)
cb-dbtest01   * python_pip[setuptools] action upgrade
cb-dbtest01     - upgrade python_pip[setuptools] version from  to latest
cb-dbtest01 Recipe: wal-e::default
cb-dbtest01   * python_pip[argparse] action install
cb-dbtest01     - install package python_pip[argparse] version latest
cb-dbtest01   * python_pip[boto] action install (up to date)
cb-dbtest01   * python_pip[gevent] action install
cb-dbtest01     
cb-dbtest01     ================================================================================
cb-dbtest01     Error executing action `install` on resource 'python_pip[gevent]'
cb-dbtest01     ================================================================================
cb-dbtest01     
cb-dbtest01     Mixlib::ShellOut::ShellCommandFailed
cb-dbtest01     ------------------------------------
cb-dbtest01     Expected process to exit with [0], but received '1'
cb-dbtest01     ---- Begin output of pip install  gevent ----
cb-dbtest01     STDOUT: Collecting gevent
cb-dbtest01       Using cached gevent-1.0.2.tar.gz
cb-dbtest01     Collecting greenlet>=0.4.7 (from gevent)
cb-dbtest01       Using cached greenlet-0.4.7.zip
cb-dbtest01     Installing collected packages: greenlet, gevent
cb-dbtest01       Running setup.py install for greenlet
cb-dbtest01         Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-2AhsVv/greenlet/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Zl4y0i-record/install-record.txt --single-version-externally-managed --compile:
cb-dbtest01         running install
cb-dbtest01         running build
cb-dbtest01         running build_ext
cb-dbtest01         building 'greenlet' extension
cb-dbtest01         creating build
cb-dbtest01         creating build/temp.linux-x86_64-2.7
cb-dbtest01         x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c greenlet.c -o build/temp.linux-x86_64-2.7/greenlet.o
cb-dbtest01         unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
cb-dbtest01         error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
cb-dbtest01         
cb-dbtest01         ----------------------------------------
cb-dbtest01     STDERR: Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-2AhsVv/greenlet/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Zl4y0i-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-2AhsVv/greenlet
cb-dbtest01     ---- End output of pip install  gevent ----
cb-dbtest01     Ran pip install  gevent returned 1
cb-dbtest01     
cb-dbtest01     Cookbook Trace:
cb-dbtest01     ---------------
cb-dbtest01     /var/chef/cache/cookbooks/python/providers/pip.rb:158:in `pip_cmd'
cb-dbtest01     /var/chef/cache/cookbooks/python/providers/pip.rb:139:in `install_package'
cb-dbtest01     /var/chef/cache/cookbooks/python/providers/pip.rb:46:in `block (2 levels) in class_from_file'
cb-dbtest01     /var/chef/cache/cookbooks/python/providers/pip.rb:44:in `block in class_from_file'
cb-dbtest01     
cb-dbtest01     Resource Declaration:
cb-dbtest01     ---------------------
cb-dbtest01     # In /var/chef/cache/cookbooks/wal-e/recipes/default.rb
cb-dbtest01     
cb-dbtest01      16:     python_pip pp do
cb-dbtest01      17:       user node[:wal_e][:pip_user]
cb-dbtest01      18:     end
cb-dbtest01      19:   end
cb-dbtest01     
cb-dbtest01     Compiled Resource:
cb-dbtest01     ------------------
cb-dbtest01     # Declared in /var/chef/cache/cookbooks/wal-e/recipes/default.rb:16:in `block in from_file'
cb-dbtest01     
cb-dbtest01     python_pip("gevent") do
cb-dbtest01       action :install
cb-dbtest01       retries 0
cb-dbtest01       retry_delay 2
cb-dbtest01       default_guard_interpreter :default
cb-dbtest01       declared_type :python_pip
cb-dbtest01       cookbook_name "wal-e"
cb-dbtest01       recipe_name "default"
cb-dbtest01       user "root"
cb-dbtest01       package_name "gevent"
cb-dbtest01       timeout 900
cb-dbtest01     end
cb-dbtest01     
cb-dbtest01 
cb-dbtest01 Running handlers:
cb-dbtest01 [2015-08-11T15:50:38-04:00] ERROR: Running exception handlers
cb-dbtest01 Running handlers complete
cb-dbtest01 [2015-08-11T15:50:38-04:00] ERROR: Exception handlers complete
cb-dbtest01 Chef Client failed. 11 resources updated in 22.320714501 seconds
cb-dbtest01 [2015-08-11T15:50:39-04:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
cb-dbtest01 [2015-08-11T15:50:39-04:00] ERROR: python_pip[gevent] (wal-e::default line 16) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
cb-dbtest01 ---- Begin output of pip install  gevent ----
cb-dbtest01 STDOUT: Collecting gevent
cb-dbtest01   Using cached gevent-1.0.2.tar.gz
cb-dbtest01 Collecting greenlet>=0.4.7 (from gevent)
cb-dbtest01   Using cached greenlet-0.4.7.zip
cb-dbtest01 Installing collected packages: greenlet, gevent
cb-dbtest01   Running setup.py install for greenlet
cb-dbtest01     Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-2AhsVv/greenlet/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Zl4y0i-record/install-record.txt --single-version-externally-managed --compile:
cb-dbtest01     running install
cb-dbtest01     running build
cb-dbtest01     running build_ext
cb-dbtest01     building 'greenlet' extension
cb-dbtest01     creating build
cb-dbtest01     creating build/temp.linux-x86_64-2.7
cb-dbtest01     x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c greenlet.c -o build/temp.linux-x86_64-2.7/greenlet.o
cb-dbtest01     unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
cb-dbtest01     error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
cb-dbtest01     
cb-dbtest01     ----------------------------------------
cb-dbtest01 STDERR: Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-2AhsVv/greenlet/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Zl4y0i-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-2AhsVv/greenlet
cb-dbtest01 ---- End output of pip install  gevent ----
cb-dbtest01 Ran pip install  gevent returned 1
cb-dbtest01 [2015-08-11T15:50:39-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
@iashwash
Copy link
Contributor

Looks like your real problem is:

unable to execute 'x86_64-linux-gnu-gcc': No such file or directory

This can be helpful:
http://stackoverflow.com/questions/26053982/error-setup-script-exited-with-error-command-x86-64-linux-gnu-gcc-failed-wit

Can you install those packages, starting with build-essential, bit-by-bit till you get the pip installing? Would be useful knowledge if we need to add package dependencies.

@n8gard
Copy link
Author

n8gard commented Aug 11, 2015

Excellent. I'll get right on it and keep track of what I do so to reconstruct. Thanks.

@n8gard
Copy link
Author

n8gard commented Aug 11, 2015

Well, that was fast. This did the trick:

package 'build-essential' do
  action :install
end

I can't say I'm off and running yet, but the knife run completed without errors. I'm surprised I didn't already have something requiring that package, but we have a very minimalist approach and don't install anything unless we know it is required. Now we do. Thanks!

@iashwash
Copy link
Contributor

Added build-essential to required packages in #18

@russss russss closed this as completed Feb 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants