我正在尝试从没有Linux
的{{1}}服务器中的克隆存储库中安装依赖项。当我执行sudo
时,它会引发一个权限被拒绝的错误。
npm install
奇怪的是,他尝试创建的文件夹不存在。文件夹的正确名称是-bash-4.2$ npm install
npm ERR! path /usr/local/apache2/htdocs/project_folder
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/apache2/htdocs/project_folder'
npm ERR! { [Error: EACCES: permission denied, mkdir '/usr/local/apache2/htdocs/project_folder']
npm ERR! stack:
npm ERR! 'Error: EACCES: permission denied, mkdir \'/usr/local/apache2/htdocs/project_folder\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/usr/local/apache2/htdocs/project_folder' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).
(注意不是下划线project-folder
,只是连字符_
)。
我拥有的用户的住所实际上是-
(这是错误的,但是我无法更改)。我对Linux不太了解,可以联系吗?
我必须使用/usr/local/apache2/htdocs/folder_project
安装它吗?
谢谢。