Phonegap Ubuntu 构建失败

Phonegap Ubuntu 构建失败

当我跑步时

phonegap build ubuntu

我收到这个错误

    Adding ubuntu project...

Creating a Cordova Project:
 Project Path: /home/david/projects/cordova/hello/platforms/ubuntu
 Package Name: com.example.hello
 Project Name: HelloWorld


missing icon element in config.xml

Discovered plugin "cordova-plugin-whitelist" in config.xml. Installing to the project

Fetching plugin "cordova-plugin-whitelist@1" via npm

Error: EACCES, open '/home/david/.plugman/plugman.log'

[phonegap] executing 'cordova build ubuntu'...
Discovered plugin "cordova-plugin-whitelist" in config.xml. Installing to the project

Error: EACCES, open '/home/david/.plugman/plugman.log'

可能是什么问题呢?

编辑:

的结果:ls -ld /home/david/.plugman/{,plugman.log}

drwxr-xr-x 3 root root 4096 Aug  8 18:44 /home/david/.plugman/
-rw-r--r-- 1 root root    0 Aug 15 14:48 /home/david/.plugman/plugman.log

编辑:

结果:sudo phonegap build ubuntu之后sudo chmod 755 /home/david/.plugman/{,plugman.log}

david@ubuntu:~/projects/cordova/hello$ sudo phonegap build ubuntu
[phonegap] executing 'cordova build ubuntu'...
Running command: /home/david/projects/cordova/hello/platforms/ubuntu/cordova/build 

Error: missing dependency click cmake libicu-dev pkg-config devscripts qtbase5-dev qtchooser qtdeclarative5-dev qtfeedback5-dev qtlocation5-dev qtmultimedia5-dev qtpim5-dev libqt5sensors5-dev qtsystems5-dev

ERROR building one of the platforms: Error: /home/david/projects/cordova/hello/platforms/ubuntu/cordova/build: Command failed with exit code 1
You may not have the required environment or OS to build this project

Error: /home/david/projects/cordova/hello/platforms/ubuntu/cordova/build: Command failed with exit code 1
    at ChildProcess.whenDone (/usr/local/lib/node_modules/phonegap/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:134:23)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:743:16)
    at Process.ChildProcess._handle.onexit (child_process.js:810:5)

答案1

尝试:

sudo chown david:david /home/david/.plugman -R

此命令应授予您自己访问目录及其内容的必要权限。

相关内容