Linux : add android platform to cordova

2019-07-03 04:16发布

When I add android platform to my project by issuing the command:

cordova platform add android

I get the following error :

Unable to fetch platform android: Error: EACCES, mkdir '/home/mo3tssem/tmp/npm-13061-R9BWhlB2'

2条回答
放荡不羁爱自由
2楼-- · 2019-07-03 04:19

Okay, so your /home/ubuntu/tmp has wrong permissions. It happened because you did sudo npm install in the past, and npm doesn't handle this well enough.

Run sudo chown ubuntu /home/ubuntu/tmp -Rv to fix this issue, or just delete that folder.

查看更多
地球回转人心会变
3楼-- · 2019-07-03 04:30

run this first:

ln -s /tmp $HOME/tmp
查看更多
登录 后发表回答