0

I am installing Apache Cordova on Ubuntu 13.10, following these instructions: http://cordova.apache.org/docs/en/3.5.0//guide_cli_index.md.html#The%20Command-Line%20Interface

I got stuck on the section "Build the App":

After adding the platform "ubuntu" which was finally done successfully, I get this:

$ cordova build
Running command: /opt/lampp/htdocs/hello/platforms/ubuntu/cordova/build 
/opt/lampp/htdocs/hello/platforms/ubuntu/cordova/check_reqs
Error: missing dependency cmake libicu-dev pkg-config qtbase5-dev qtchooser qtdeclarative5-dev qtfeedback5-dev qtlocation5-dev qtmultimedia5-dev qtpim5-dev qtsensors5-dev qtsystems5-dev
/opt/lampp/htdocs/hello/platforms/ubuntu/cordova/check_reqs FAILED
Error: /opt/lampp/htdocs/hello/platforms/ubuntu/cordova/build: Command failed with exit code 1
at ChildProcess.whenDone (/usr/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:755:16)
at Process.ChildProcess._handle.onexit (child_process.js:822:5)

And I DO have installed these (sudo apt-get install [...]): cmake libicu-dev pkg-config qtbase5-dev qtchooser qtdeclarative5-dev qtfeedback5-dev qtlocation5-dev qtmultimedia5-dev qtpim5-dev qtsensors5-dev qtsystems5-dev

Lokomotywa
  • 2,624
  • 8
  • 44
  • 73

1 Answers1

1

When you open up the code for platforms/ubuntu/cordova/check_reps you'll notice something interesting:

var deps = "cmake libicu-dev pkg-config qtbase5-dev qtchooser qtdeclarative5-dev qtfeedback5-dev qtlocation5-dev qtmultimedia5-dev qtpim5-dev qtsensors5-dev qtsystems5-dev";

exec("dpkg-query -Wf'${db:Status-abbrev}\\n' click " + deps, function(error, stdout, stderr)

This will call the following shell command:

dpkg-query -Wf'${db:Status-abbrev}\n' click cmake libicu-dev [and so on...]

I don't know why the "click" package isn't included as part of the deps string, but it's also required and the error message won't tell you that.

I found that installing click did the trick:

sudo apt-get install click

Good luck!