程序运行报错总结

跑程序难免会遇到各种各样的错误,解决办法也多种多样,自此仅总结我所遇到的问题和最优的解决方案。

R报错

1
2
>alphaData = read.csv("data.csv")
Error: REAL() can only be applied to a 'numeric', not a 'integer'

解决办法

1
alphaData = read.csv("data.csv") * 1.0

npm报错

1
2
ERR! Windows_NT 6.3.9600
Error: tunneling socket could not be established, cause=connect ECONNREFUSED

解决办法

1
2
3
4
5
6
#first run
npm cache clean
#If there is no proxy , remove proxy config from npm
npm config set proxy null
npm config set https-proxy null
npm install -g XXXX

python报错

1. re模块正则匹配时报错

1
AttributeError: 'NoneType' object has no attribute 'group'

解决办法
写的正则表达式匹配不到任何内容,检查正则表达式正确性。

2. lib库报错

1
error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory

添加python的lib库地址到环境变量即可。

生信软件安装报错

make编译过程报错

1
error: ‘getpid’ was not declared in this scope

解决办法
添加#include <unistd.h>在相应报错的XX.cpp文件头部

tiramisutes wechat
欢迎关注
0%