在linux /sbin/ldconfig.real上安装opencv-python时出错:/usr/lib32/nvidia-384/libEGL.so.1不是符号链接

时间:2017-11-23 07:09:38

标签: python linux opencv ubuntu-14.04 nvidia

我一直在按照本教程安装opencv和python:

https://www.pyimagesearch.com/2015/06/22/install-opencv-3-0-and-python-2-7-on-ubuntu/#comment-441393

唯一的区别是我正在尝试安装opencv 3.3.1而不是3.0.0

我正在使用Ubuntu 14.04和i7和NVIDIA GTX950M的笔记本电脑上运行

问题是当我执行命令ldconfig

$ sudo make install
$ sudo ldconfig

我收到以下消息:

/sbin/ldconfig.real: /usr/lib/nvidia-384/libEGL.so.1 is not a symbolic link

/sbin/ldconfig.real: /usr/lib32/nvidia-384/libEGL.so.1 is not a symbolic link

1 个答案:

答案 0 :(得分:0)

所以我找到了解决问题的方法:

资料来源:https://askubuntu.com/questions/900285/libegl-so-1-is-not-a-symbolic-link @muru @Gerard Tromp

  

以下是Noisy_Botnet解决方案易于使用的版本。它   有助于重复任何更新的过程。

创建一个shell脚本,即将代码粘贴到文本文件下面,并使用.sh扩展名保存。 更改文件的执行权限,即转到终端中文件的位置并执行以下命令$ sudo chmod 744 nameofthefieleyoucreated.sh 执行以下命令$ sudo ./nameofthefileyoucreated.sh

#! /bin/sh
#
# find the file in /usr/lib
LIBEGL=`find /usr/lib/nvidia* -name libEGL.so.\* | egrep "[0-9][0-9]*\.[0-9][0-9]*$"`
LIBEGL_LINK=`echo $LIBEGL | sed 's/[0-9][0-9]*\.[0-9][0-9]*$/1/'`
printf "\n\nThe following commands will be executed:\n+++++++++++++++++++++++++++++++++++++++\n"
printf "mv $LIBEGL_LINK ${LIBEGL_LINK}.orig\nln -s $LIBEGL $LIBEGL_LINK\n\n"
while true; do
    read -p "Do you wish to perform these commands?  " yn
    case $yn in
        [Yy]* ) mv $LIBEGL_LINK ${LIBEGL_LINK}.orig; ln -s $LIBEGL $LIBEGL_LINK ; break;;
        [Nn]* ) break;;
        * ) echo "Please answer yes or no.";;
    esac
done

# find the file in /usr/lib32
LIBEGL=`find /usr/lib32/nvidia* -name libEGL.so.\* | egrep "[0-9][0-9]*\.[0-9][0-9]*$"`
LIBEGL_LINK=`echo $LIBEGL | sed 's/[0-9][0-9]*\.[0-9][0-9]*$/1/'`
printf "\n\nThe following commands will be executed:\n+++++++++++++++++++++++++++++++++++++++\n"
printf "mv $LIBEGL_LINK ${LIBEGL_LINK}.orig\nln -s $LIBEGL $LIBEGL_LINK\n\n"
while true; do
    read -p "Do you wish to perform these commands?  " yn
    case $yn in
        [Yy]* ) mv $LIBEGL_LINK ${LIBEGL_LINK}.orig; ln -s $LIBEGL $LIBEGL_LINK ; break;;
        [Nn]* ) break;;
        * ) echo "Please answer yes or no.";;
    esac
done
相关问题