命令如下:
>sudo apt-get update
报错信息如下
>E: Problem executing scripts APT::Update::Post-Invoke-Success ‘if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh > /dev/null; fi’
>E: Sub-process returned an error code
解决办法如下:
链接:https://bugs.launchpad.net/ubuntu/+source/appstream/+bug/1579712/comments/24
>cd /tmp && mkdir asfix
>cd asfix
>wget https://launchpad.net/ubuntu/+archive/primary/+files/appstream_0.9.4-1ubuntu1_amd64.deb
>wget https://launchpad.net/ubuntu/+archive/primary/+files/libappstream3_0.9.4-1ubuntu1_amd64.deb
>sudo dpkg -i *.deb
命令如下:
>npm install vue --save
报错信息如下
⚠ The `/home/fg/web/php/recipe-box/node_modules/_mozjpeg@4.1.1@mozjpeg/vendor/cjpeg` binary doesn't seem to work correctly
⚠ mozjpeg pre-build test failed
ℹ compiling from source
✖ Error: autoreconf -fiv && ./configure --disable-shared --prefix="/home/fg/web/php/recipe-box/node_modules/_mozjpeg@4.1.1@mozjpeg/vendor" --bindir="/home/fg/web/php/recipe-box/node_modules/_mozjpeg@4.1.1@mozjpeg/vendor" --libdir="/home/fg/web/php/recipe-box/node_modules/_mozjpeg@4.1.1@mozjpeg/vendor" && make --jobs=1 && make install --jobs=1
Command failed: autoreconf -fiv
/bin/sh: 1: autoreconf: not found
解决办法如下:
链接:http://blog.csdn.net/junmuzi/article/details/18803687
>sudo apt-get install autoconf automake libtool
npm成功安装后,执行命令时找不到命令
fg@fg-ubuntu:~$ npm install -g n
/opt/node/bin/n -> /opt/node/lib/node_modules/n/bin/n
/opt/node/lib
└── n@2.1.8
fg@fg-ubuntu:~$ n stable
bash: n: 未找到命令
解决方案:修改配置环境
链接:http://blog.csdn.net/wirelessqa/article/details/53393248
fg@fg-ubuntu:~$ echo -e "export PATH=$(npm prefix -g)/bin:$PATH" >> ~/.bashrc && source ~/.bashrc
fg@fg-ubuntu:~$ vue
Usage: vue <command> [options]
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
init generate a new project from a template
list list available official templates
build prototype a new project
help [cmd] display help for [cmd]