【问题标题】:Can't install nodejs-legacy无法安装 nodejs-legacy
【发布时间】:2018-03-25 10:34:06
【问题描述】:

我正在尝试遵循 this 教程,但遇到了 Node.js 安装问题。在 Debian VM 上安装,并在 nodejs 站点上运行了建议的安装命令:

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejson 

当我运行sudo apt-get install nodejs-legacy 时,它给了我这个错误:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
 nodejs-legacy : Depends: nodejs (>= 0.6.19~dfsg1-3~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

对正在发生的事情有什么想法吗?

【问题讨论】:

  • Depends: nodejs (>= 0.6.19~dfsg1-3~) but it is not going to be installed. 安装最新版本的 node.js 。它可以解决问题
  • 未安装版本 6 并安装了版本 8。不幸的是没有运气
  • 尝试将url改成curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
  • 2044 次浏览。这意味着这是一个足够普遍的问题。但没有解决方案?
  • 有人找到解决方案了吗?我什至尝试将节点更新到最新版本。还是一样的错误!

标签: node.js debian installation


【解决方案1】:

在整理垃圾时发现了这个带有一些说明的旧 .txt 文件。看来我最终解决了问题。

  1. sudo apt-get install python3-pip

  2. curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -

    sudo apt-get install -y nodejs

    sudo apt-get install -y build-essential

  3. sudo npm i webpack -g

  4. sudo npm install --global yarn@1.0.2

  5. https://cloud.google.com/community/tutorials/setting-up-postgres sudo -u postgres psql -c '创建数据库销售员'

    sudo -u postgres psql -c "CREATE ROLE saleor WITH SUPERUSER CREATEDB CREATEROLE LOGIN ENCRYPTED PASSWORD 'saleor';"

    sudo -u postgres psql -c '将数据库saleor的所有权限授予saleor;'

  6. sudo apt-get install python3-venv

    pyvenv env1

    源 env1/bin/激活

    停用

  7. sudo apt-get install git

  8. git clone https://github.com/mirumee/saleor.git

  9. CD 销售员

  10. pip3 install -r requirements.txt

  11. 导出 SECRET_KEY='yourkey'

  12. python3 manage.py 迁移

  13. 纱线

  14. sudo apt-get install libfontconfig

  15. yarn run build-assets

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-01-29
    • 2022-11-08
    • 2023-01-27
    • 2020-10-06
    • 2017-12-07
    • 2019-05-27
    相关资源
    最近更新 更多