0

在使用 Raspberry Pi 时,我完全是个菜鸟。

到目前为止我采取的步骤:

  1. 在 Raspberry Pi 2 上完成了最新稳定版 Raspbian Jessie 的全新安装。

  2. 从https://github.com/screeps/screeps下载并解压缩包含 Screeps 服务器文件的文件夹

  3. 尝试运行随服务器文件提供的“自述”文件中给出的第一个命令

    npm install screeps
    
  4. 死了。

据我所知,在尝试安装 Screeps 服务器之前,我需要安装较新版本的 npm 和 nodejs,但我不知道如何执行这些任务。

4

2 回答 2

0

您可能内存不足。(运行 npm 需要大量内存)尝试增加交换空间以拥有至少 2gb 的可用内存。

编辑/etc/dphys-swapfile,将 CONF_SWAPSIZE 更改为 = 1024 或 1536 并重新启动。

于 2018-07-01T05:44:24.487 回答
0

你有安装 npm 吗?如果没有,那么您需要先运行几个命令。(免责声明我即将列出的命令适用于 Ubuntu 16.04,可能适用于 Raspbian,也可能不适用。简单的谷歌搜索将为您提供 Raspbian 等价物,但我将把研究留给您。)

'#' 是注释,并不意味着在命令行中输入。

sudo apt-get update       #will update your machine
sudo apt-get upgrade      #will upgrade your machine
sudo apt-get install npm  #will install npm on your machine
sudo npm install screeps  #will use npm to install screeps
screeps init              #should be preformed in the directory you want to run screeps in and the current user has read/write/execute privileges 
screeps start             # will start your screeps server

最后一个命令可以替换为

screeps start --host x.x.x.x#'x' 表示树莓派的 ip,以便它知道它将在哪里接收请求

于 2018-02-05T02:54:23.337 回答