2021-03-01 ubuntu 安装 stf

一:依赖库安装
(1)nodejs 安装 (一定要是8.x的版本)

wget https://nodejs.org/dist/v8.9.0/node-v8.9.0-linux-x64.tar.gz    // 下载
tar xf  node-v8.9.0-linux-x64.tar.gz       // 解压
cd node-v8.9.0-linux-x64/                  // 进入解压目录
./bin/node -v                               // 执行node命令 查看版本

使用 ln 命令来设置软连接:
ln -s /usr/software/nodejs/bin/npm   /usr/local/bin/ 
ln -s /usr/software/nodejs/bin/node   /usr/local/bin/

(2)adb 安装

sudo apt install android-tools-adb android-tools-fastboot

(3)RethinkDB安装

source /etc/lsb-release && echo "deb https://download.rethinkdb.com/repository/ubuntu-$DISTRIB_CODENAME $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
wget -qO- https://download.rethinkdb.com/repository/raw/pubkey.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install rethinkdb

(4)GraphicsMagick安装

第一种方法: sudo apt-get install graphicsmagick
第二种源码安装:
  1、tar -xvzf GraphicsMagick-x.x.x.tar.gz
  2、cd GraphicsMagick-x.x.x ***安装之前,因为是图片处理,所以需要系统中安装了libpng和libjpeg的开发包,否则的话不会安装这两种文件的支持***
  3、./configure
  4、make
        make install

(5)ZeroMQ安装

apt-get install libzmq3-dev

(6)Protocol Buffer 安装

$ sudo apt-get install autoconf automake libtool curl make g++ unzip
$ git clone https://github.com/google/protobuf.git
$ cd protobuf
$ git submodule update --init --recursive
$ ./autogen.sh
$ ./configure
$ make
$ make check
$ sudo make install
$ sudo ldconfig # refresh shared library cache.

(7)yasm 安装

apt install yasm

(8)pkg-config 安装

二、安装stf(要求 Python 是 2.7 版本,不能是大于3.0的版本)

mkdir openstf
cd openstf/
git clone https://github.com/openstf/stf.git
cd stf
npm install
npm link

三、运行 stf
(1) 创建一个想存放数据库的目录,启动RethinkDB

$ mkdir db
$ cd db
$ RethinkDB

(2) 启动 stf

cd openstf/stf/bin
stf local

(3) 用浏览器打开 http://local:7100
完毕

备注命令:sudo npm install -g stf --unsafe-perm

错误处理:
报错处理之 -- 关于node-sass里面 vendor 缺失(引用 https://github.com/deepthan/blog-angular/issues/38

  • 法一 : 找到缺失的文件直接下载

首先看开头的错误信息,

  1. ERROR in...在什么地方报错了,
  2. Module build failed后面跟的是模块打包错误原因及地址,
  3. no such file or directory, scandir 'D:\个人\gitee-poetry\node_modules\@angular\cli\node_modules\node-sass\vendor',在D:\个人\gitee-poetry\node_modules\@angular\cli\node_modules\node-sass\vendor'中vendor文件不存在。

那么我们找到这个文件位置,从node-sass官网下载一个vendor文件放进去即可。

  • 法二 : 重新构建 node-sass
npm rebuild node-sass

或者删除 node_modules 重新下载

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容