gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-04 12:15:52 34 4
gpt4 key购买 nike

我一直在按照本教程安装 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

最佳答案

于是我找到了解决问题的办法:

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

The following is an easy-to-use version of Noisy_Botnet's solution. It facilitates repeating the process for any update.

创建一个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

关于python - 在 linux/sbin/ldconfig.real 上安装 opencv-python 时出错 :/usr/lib32/nvidia-384/libEGL. so.1 不是符号链接(symbolic link),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47449512/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com