最近在使用pyqt5编写多媒体播放程序, 发现ubuntu18.04.1下竟然无法使用下面的命令安装libgstreamer1.0-dev.
sudo apt install libgstreamer1.0-dev
提示依赖库: libglib2.0-dev不满足要求. 网上查了资料,没有发现大家说无法安装啊?! 下载deb包安装依旧不行.
怀疑当前使用的source.list依赖配置有问题, 改成ali的源, 执行:
sudo apt update && sudo apt upgrade
提示部分升级...? 查看source.list文件:
sudo vim /etc/apt/source.list
发现所有 src源不知什么时候被自己注释掉了.
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
#deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
#deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
#deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
#deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
#deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
去掉注释, 重新更新并执行安装代码:
sudo apt update && sudo apt upgrade && sudo apt install libgstreamer1.0-dev
OK, 顺利完成安装.
网友评论