【问题标题】:Error installing frappe: Permission denied: 'yarn' on CentOS 7安装 frappe 时出错:权限被拒绝:CentOS 7 上的“纱线”
【发布时间】:2022-01-13 09:24:38
【问题描述】:

我正在尝试在预装了 CentOS 7 和 Plesk 的 VPS 上安装 ERPNext。

在我需要使用此命令的步骤:

 bench init --frappe-branch version-12 frappe-bench

我收到此错误:

[frappe@musing-carver npm]$  bench init --frappe-branch version-12 frappe-bench
$ /usr/local/bin/virtualenv --quiet env -p python3
$ /usr/lib/node_modules/npm/frappe-bench/env/bin/python -m pip install --quiet --upgrade pip
Getting frappe
$ git clone https://github.com/frappe/frappe.git --branch version-12  --origin upstream
Cloning into 'frappe'...
remote: Enumerating objects: 318014, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 318014 (delta 0), reused 0 (delta 0), pack-reused 318013
Receiving objects: 100% (318014/318014), 299.62 MiB | 25.33 MiB/s, done.
Resolving deltas: 100% (243376/243376), done.
Installing frappe
$ /usr/lib/node_modules/npm/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /usr/lib/node_modules/npm/frappe-bench/apps/frappe
$ yarn install
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/bench/commands/make.py", line 83, in init
    verbose=verbose,
  File "/usr/local/lib/python3.6/site-packages/bench/utils/render.py", line 95, in wrapper_fn
    return fn(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/bench/utils/system.py", line 79, in init
    frappe_path, branch=frappe_branch, bench_path=path, skip_assets=True, verbose=verbose
  File "/usr/local/lib/python3.6/site-packages/bench/app.py", line 355, in get_app
    app.install(verbose=verbose, skip_assets=skip_assets)
  File "/usr/local/lib/python3.6/site-packages/bench/utils/render.py", line 110, in wrapper_fn
    return fn(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/bench/app.py", line 187, in install
    app=app_name, bench_path=self.bench.name, verbose=verbose, skip_assets=skip_assets,
  File "/usr/local/lib/python3.6/site-packages/bench/app.py", line 412, in install_app
    bench.run("yarn install", cwd=app_path)
  File "/usr/local/lib/python3.6/site-packages/bench/bench.py", line 43, in run
    return exec_cmd(cmd, cwd=cwd or self.cwd)
  File "/usr/local/lib/python3.6/site-packages/bench/utils/__init__.py", line 122, in exec_cmd
    return_code = subprocess.call(cmd, cwd=cwd, universal_newlines=True, env=env)
  File "/usr/lib64/python3.6/subprocess.py", line 287, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib64/python3.6/subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "/usr/lib64/python3.6/subprocess.py", line 1364, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: 'yarn'

ERROR: There was a problem while creating frappe-bench

我正在一步一步地学习这个教程:How To Install ERPNext in CentOS / RHEL || Erpnext || TechHack Tamil

我有 nodejs v10 而不是 v14 或 v16,¿这是个问题吗?

提前谢谢你

【问题讨论】:

    标签: linux centos7 hadoop-yarn erpnext


    【解决方案1】:

    在执行命令前尝试使用 sudo

    sudo  bench init --frappe-branch version-12 frappe-bench
    

    告诉我结果

    【讨论】:

    【解决方案2】:

    我已经解决了这个问题。

    我只是重新安装了 yarn,现在它可以工作了。

    sudo yum install yarn
    

    我不知道它之前失败的确切原因......欢迎任何澄清。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-12-13
      • 2016-05-02
      • 1970-01-01
      • 2019-08-05
      • 1970-01-01
      • 2015-05-05
      • 2011-07-05
      • 1970-01-01
      相关资源
      最近更新 更多