各種遇到問題彙總
- 【注意】以下爲平時遇到問題彙總並解決,有些問題是幾個月前遇到,更新不及時,不要誤解(之前博客並不是用csdn,所以有的並沒怎麼轉移)。
- `NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running. `
- CentOS 7不能進入圖形界面
- NVIDIA Driver 安裝提示 mesa-libGLES 包衝突
- Centos yum install no package xxx availabel
- gpupdate /force用於解決有時候不能聯網問題
- visio2013畫圖時兩條直線交叉讓它不彎曲
- Python的數字填充000530
- 安裝python時Ignoring ensurepip failure:pip required SSL/TLS和There are no enabled repos
- Java8 Stream多條件排序的重要方法
- Java阿拉伯數字轉化爲中文數字大寫
- Java中文數字轉阿拉伯數字
- cuda decoder:Input features did not have expected dimension: expected 43, got 40
- docker容器報:IPv4 forwarding is disabled. Networking will not work
- 缺少動態鏈接庫.so cannot open shared object file: No such file or directory
【注意】以下爲平時遇到問題彙總並解決,有些問題是幾個月前遇到,更新不及時,不要誤解(之前博客並不是用csdn,所以有的並沒怎麼轉移)。
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
yum install -y kernel-devel
yum install epel-release
yum install --enablerepo=epel dkms
yum install kernel*
CentOS 7不能進入圖形界面
# 聯網執行這條命令後重啓即可
yum upgrade
NVIDIA Driver 安裝提示 mesa-libGLES 包衝突
Transaction check error:
file /usr/lib64/libEGL.so.1 from install of libglvnd-egl-1:1.0.1-0.8.git5baa1e5.el7.x86_64 conflicts with file from package mesa-libEGL-17.2.3-8.20171019.el7.x86_64
file /usr/lib64/libGLESv2.so.2 from install of libglvnd-gles-1:1.0.1-0.8.git5baa1e5.el7.x86_64 conflicts with file from package mesa-libGLES-17.2.3-8.20171019.el7.x86_64
file /usr/lib64/libGL.so.1 from install of libglvnd-glx-1:1.0.1-0.8.git5baa1e5.el7.x86_64 conflicts with file from package mesa-libGL-17.2.3-8.20171019.el7.x86_64
Error Summary
運行命令(該方法沒用):sudo yum -y install kmod-nvidia
更新命令:yum update mesa-libEGL
參考鏈接——Centos7安裝Cuda/cudnn教程
Centos yum install no package xxx availabel
yum install eple-release
yum makecache
gpupdate /force用於解決有時候不能聯網問題
visio2013畫圖時兩條直線交叉讓它不彎曲
在工具欄選擇設計,選擇連接線,在下拉菜單中,把“顯示跨線”前的勾去掉
Python的數字填充000530
str = '530';
result=str.zfill(6);
安裝python時Ignoring ensurepip failure:pip required SSL/TLS和There are no enabled repos
沒有安裝OpenSSL庫
yum install openssl-devel
sudo apt-get install libssl-dev
Java8 Stream多條件排序的重要方法
Comparator<ITerm> a=(x,y)->x.score-y.score;
Comparator<ITerm> c = a.thenCompareing((x,y)->x.num-y.num);
Java阿拉伯數字轉化爲中文數字大寫
Java中文數字轉阿拉伯數字
Java中文數字轉阿拉伯數字
這個有問題的地方在於:
1、需要將幺替換爲一
2、兩百二十萬零五千,會有問題,需要在return前一句做一個萬、億的前置判斷
public static int zh2arbaNum(String zhNumStr) {
Stack<Integer> stack = new Stack<>();
String numStr = "一二三四五六七八九";
String unitStr = "十百千萬億";
String[] ssArr = zhNumStr.split("");
for (String e : ssArr ) {
int numIndex = numStr.indexOf(e);
int unitIndex = unitStr.indexOf(e);
if (numIndex != -1 ) {
stack.push(numIndex + 1);
} else if (unitIndex != -1) {
int unitNum = (int)Math.pow(10, unitIndex + 1);
if (stack.isEmpty()) {
stack.push(unitNum);
} else {
stack.push( stack.pop() * unitNum);
}
}
};
return stack.stream().mapToInt(s-> s).sum();
}
cuda decoder:Input features did not have expected dimension: expected 43, got 40
解決方案地址
這個問題在GitHub上遇到過,並自己提供瞭解決方案
其實是因爲batched-wav-nnet3-cuda已經實現了GPU版本的特徵提取,但是pitch並未實現,因此,可以在batched-wav-nnet3-cuda測試的時候加入如下參數:
# 當然如果是簡單的asr,可以不使用pitch特徵,這樣就可以直接使用GPU來提取特徵
--gpu-feature-extract=false
docker容器報:IPv4 forwarding is disabled. Networking will not work
# 修改宿主機如下配置 或 vim /usr/lib/sysctl.d/00-system.conf
vim /etc/sysctl.conf
#添加如下內容 net.ipv4.ip_forward = 1
# 重啓network服務
systemctl restart network
#查看是否修改成功,如果返回爲“net.ipv4.ip_forward = 1”則表示成功了
sysctl net.ipv4.ip_forward
# 找到剛剛啓動的容器
docker ps -a
#刪除剛啓動的容器,然後重新創建容器並啓動即可
docker rm '之前啓動的容器'
缺少動態鏈接庫.so cannot open shared object file: No such file or directory
在Kaldi的ASR模型測試的時候會遇到這種問題,仔細想來其實是因爲對應的so庫沒有在linux cache中產生,因此,可有以下方法參考鏈接:
- 將需要的so文件鏈接到**/usr/lib/ 或 /lib**這兩個默認目錄下
ln -s /you/install/lib/*.so /usr/lib
- 修改環境變量LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/you/install/lib:$LD_LIBRARY_PATH
#不要忘記ldconfig刷新,但是發現這種方法不太靠譜和管用,建議第一種方法最爲牢固
sudo ldconfig
- 修改**/etc/ld.so.conf**,然後再刷新cache
vim /etc/ld.so.conf
# add /you/install/lib
sudo ldconfig