Ubuntu cordova不能运行没有根 [英] Ubuntu cordova cannot run without root

查看:95
本文介绍了Ubuntu cordova不能运行没有根的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试过运行

npm install -g cordova

但它不能安装它,必须有sudo之前。这将导致我要添加一个新项目我必须运行

but it cannot install it, must have "sudo" before it. This lead to when I want to add a new project I have to run

sudo cordova create

但它不能运行,它说ANDROID_HOME未设置。当我运行

But it cannot run, it said ANDROID_HOME is not set. When I run

sudo -i

用root运行,它可以运行find。我编辑.bashrc为/ root /和/ home / myUser /

to run with root, it can run find. I have edit .bashrc for /root/ and /home/myUser/

那么,如何安装cordova与

So, how can I install cordova with

npm install -g cordova

? >

推荐答案

您将要更改安装cordova的路径的所有者,并可能更改您将要构建的路径的所有者。

You will want to change the owner of the path where cordova is installed and possibly change the owner of the path you will be building in.

对于cordova:

sudo chown -R {your_user_name} /path/to/where/cordova/installed

be:

sudo chown -R {your_user_name} /path/to/app/project

这篇关于Ubuntu cordova不能运行没有根的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆