Nabeel Ayub
Nabeel Ayub

Reputation: 1250

how to install cmake in Google Cloud Platform

I am trying to deploy django project which uses dlib library, but while deploying, Google console throws an error that CMake is required to install dlib. These both are in my system but how do I make them to work in Google Cloud? How can I install cmake in Google Cloud? All my packages are mentioned in requirements.txt.

Google console:

Step #1 - "builder": RuntimeError:
Step #1 - "builder": *******************************************************************
Step #1 - "builder": CMake must be installed to build the following extensions: dlib
Step #1 - "builder": *******************************************************************
Step #1 - "builder":
Step #1 - "builder":
Step #1 - "builder": ----------------------------------------
Step #1 - "builder": Running setup.py clean for dlib
Step #1 - "builder": Building wheel for face-recognition-models (setup.py): started
Step #1 - "builder": Building wheel for face-recognition-models (setup.py): finished with status 'done'
Step #1 - "builder": Stored in directory: /tmp/tmpfuPQRa/wheel
Step #1 - "builder": Building wheel for gast (setup.py): started
Step #1 - "builder": Building wheel for gast (setup.py): finished with status 'done'
Step #1 - "builder": Stored in directory: /tmp/tmpfuPQRa/wheel
Step #1 - "builder": Building wheel for gif2numpy (setup.py): started
Step #1 - "builder": Building wheel for gif2numpy (setup.py): finished with status 'done'
Step #1 - "builder": Stored in directory: /tmp/tmpfuPQRa/wheel
Step #1 - "builder": Building wheel for hashids (setup.py): started
Step #1 - "builder": Building wheel for hashids (setup.py): finished with status 'done'
Step #1 - "builder": Stored in directory: /tmp/tmpfuPQRa/wheel
Step #1 - "builder": Building wheel for imutils (setup.py): started
Step #1 - "builder": Building wheel for imutils (setup.py): finished with status 'done'
Step #1 - "builder": Stored in directory: /tmp/tmpfuPQRa/wheel
Step #1 - "builder": Building wheel for kaitaistruct (setup.py): started
Step #1 - "builder": Building wheel for kaitaistruct (setup.py): finished with status 'done'
Step #1 - "builder": Stored in directory: /tmp/tmpfuPQRa/wheel
Step #1 - "builder": Building wheel for numpy2gif (setup.py): started
Step #1 - "builder": Building wheel for numpy2gif (setup.py): finished with status 'done'
Step #1 - "builder": Stored in directory: /tmp/tmpfuPQRa/wheel
Step #1 - "builder": Building wheel for opt-einsum (setup.py): started
Step #1 - "builder": Building wheel for opt-einsum (setup.py): finished with status 'done'
Step #1 - "builder": Stored in directory: /tmp/tmpfuPQRa/wheel
Step #1 - "builder": Building wheel for PILasOPENCV (setup.py): started
Step #1 - "builder": Building wheel for PILasOPENCV (setup.py): finished with status 'done'
Step #1 - "builder": Stored in directory: /tmp/tmpfuPQRa/wheel
Step #1 - "builder": Building wheel for PyYAML (setup.py): started
Step #1 - "builder": Building wheel for PyYAML (setup.py): finished with status 'done'
Step #1 - "builder": Stored in directory: /tmp/tmpfuPQRa/wheel
Step #1 - "builder": Building wheel for termcolor (setup.py): started
Step #1 - "builder": Building wheel for termcolor (setup.py): finished with status 'done'
Step #1 - "builder": Stored in directory: /tmp/tmpfuPQRa/wheel
Step #1 - "builder": Building wheel for wrapt (setup.py): started
Step #1 - "builder": Building wheel for wrapt (setup.py): finished with status 'done'
Step #1 - "builder": Stored in directory: /tmp/tmpfuPQRa/wheel
Step #1 - "builder": Successfully built absl-py face-recognition-models gast gif2numpy hashids imutils kaitaistruct numpy2gif opt-einsum PILasOPENCV PyYAML termcolor wrapt
Step #1 - "builder": Failed to build dlib
Step #1 - "builder":
Step #1 - "builder": INFO `pip_download_wheels` had stderr output:
Step #1 - "builder": Failed building wheel for dlib
Step #1 - "builder": ERROR: Failed to build one or more wheels
Step #1 - "builder":
Step #1 - "builder": ERROR error: `pip_download_wheels` returned code: 1
Step #1 - "builder": INFO pip_download_wheels took 114 seconds
Step #1 - "builder": INFO build process for FTL image took 119 seconds
Step #1 - "builder": INFO full build took 119 seconds
Step #1 - "builder": ERROR `pip_download_wheels` had stderr output:
Step #1 - "builder": Failed building wheel for dlib
Step #1 - "builder": ERROR: Failed to build one or more wheels
Step #1 - "builder":
Step #1 - "builder": error: `pip_download_wheels` returned code: 1
Step #1 - "builder": Traceback (most recent call last):
Step #1 - "builder": File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
Step #1 - "builder": "__main__", fname, loader, pkg_name)
Step #1 - "builder": File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
Step #1 - "builder": exec code in run_globals
Step #1 - "builder": File "/usr/local/bin/ftl.par/__main__.py", line 65, in <module>
Step #1 - "builder": File "/usr/local/bin/ftl.par/__main__.py", line 57, in main
Step #1 - "builder": File "/usr/local/bin/ftl.par/__main__/ftl/common/ftl_error.py", line 58, in UserErrorHandler
Step #1 - "builder": IOError: [Errno 2] No such file or directory: '""/output'
Finished Step #1 - "builder"

Upvotes: 0

Views: 1228

Answers (1)

Pradeep Bhadani
Pradeep Bhadani

Reputation: 4741

you can install cmake as

  1. If you are on CentOS
sudo yum install -y cmake
  1. Debian/Ubuntu based Operating system
sudo apt update
sudo apt-get install -y cmake

Or you can install build-essential package

sudo apt-get install -y build-essential

Hope this helps

Upvotes: 6

Related Questions