ubuntu 17.04安装网易云音乐linux版依赖包出错的解决办法

题记

博主最近手贱把Ubuntu从16.10升级到了17.04然后网易云音乐就没法用了。。。
重新安装deb包然后给我报错这个libqt5libqgtk2依赖缺失

然后我就去装这个依赖吧,但是这个依赖已经改名了,you kown

改成了这个qt5-style-plugins
可恨的Ubuntu,社区开始喜欢你的界面的时候你跟我说你要停止开发了。。。

没法,17.04没有这个依赖包,那怎么办,自己写一个依赖包,我一开始打开了云音乐的deb包想改这个依赖,但是找不到对应的目录,然后只能自己造一个libqt5libqgtk2装了

我也是参考了很多大神和前人的博文,然后照猫画虎的做出了一个deb包,下面进入正题

1.安装制作包软件

其实我也没研究过这个软件,哈哈哈哈

直接上代码

hero@hero-K45VD:~/Downloads$ sudo apt install equivs

2.制作依赖的deb包

hero@hero-K45VD:~/Downloads$ equivs-control libqt5libqgtk2

我是在下载目录制作的这个包,然后你们可以改位置
这个命令执行完,就会在这个目录下多出来了一个叫libqt5libqgtk2的文件

然后我们先卸载云音乐,虽然不卸载也能用,但是就apt一直报错要你解决依赖的问题,所以我还是先卸载了再说吧。

然后编辑这个文件

vim libqt5libqgtk2

然后输出是这样的

### Commented entries have reasonable defaults.
### Uncomment to edit them.
# Source: 
Section: misc
Priority: optional
# Homepage: 
Standards-Version: 3.9.2

Package: libqt5libqgtk2
# Version: 
# Maintainer: Your Name 
# Pre-Depends: 
# Depends: 
# Recommends: 
# Suggests: 
Provides: qt5-style-plugins
# Replaces: 
Architecture: all
# Multi-Arch: 
# Copyright: 
# Changelog: 
# Readme: 
# Extra-Files: 
# Files: 
#  
Description: just for net
 and not

这是我改过的,大家照着改一下就行了,如果你试着挽救你的系统然后安装了qt5-style-plugins,那也是先卸载了吧,不卸载会报错的哈哈

然后我们直接打包成deb

hero@hero-K45VD:~/Downloads$ equivs-build libqt5libqgtk2
dh_testdir
dh_testroot
dh_prep
dh_testdir
dh_testroot
dh_install
dh_install: Compatibility levels before 9 are deprecated (level 7 in use)
dh_installdocs
dh_installdocs: Compatibility levels before 9 are deprecated (level 7 in use)
dh_installchangelogs
dh_compress
dh_fixperms
dh_installdeb
dh_installdeb: Compatibility levels before 9 are deprecated (level 7 in use)
dh_gencontrol
dh_md5sums
dh_builddeb
dpkg-deb: building package 'libqt5libqgtk2' in '../libqt5libqgtk2_1.0_all.deb'.

The package has been created.
Attention, the package has been created in the current directory,
not in ".." as indicated by the message above!
hero@hero-K45VD:~/Downloads$

然后这是这个目录下就会有个libqt5libqgtk2_1.0_all.deb包,然后我们安装

hero@hero-K45VD:~/Downloads$ sudo dpkg --install libqt5libqgtk2_1.0_all.deb 
(Reading database ... 261318 files and directories currently installed.)
Preparing to unpack libqt5libqgtk2_1.0_all.deb ...
Unpacking libqt5libqgtk2 (1.0) over (1.0) ...
Setting up libqt5libqgtk2 (1.0) ...

然后再安装网易云就不会报错了

hero@hero-K45VD:~/Downloads$ sudo dpkg --install netease-cloud-music_1.0.0_amd64_ubuntu16.04.deb 
Selecting previously unselected package netease-cloud-music.
(Reading database ... 261318 files and directories currently installed.)
Preparing to unpack netease-cloud-music_1.0.0_amd64_ubuntu16.04.deb ...
Unpacking netease-cloud-music (1.0.0) ...
Setting up netease-cloud-music (1.0.0) ...
Processing triggers for hicolor-icon-theme (0.15-1) ...
Processing triggers for bamfdaemon (0.5.3+17.04.20170406-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for gnome-menus (3.13.3-6ubuntu5) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu2) ...
Processing triggers for mime-support (3.60ubuntu1) ...

ubuntu 17.04安装网易云音乐linux版依赖包出错的解决办法_第1张图片
大概就是这样,我待会会贴出这个libqt5libqgtk2.deb包的百度云地址,省的大家再去制作浪费时间了

链接: https://pan.baidu.com/s/1boJpbqB 密码: 2iyv

你可能感兴趣的:(系统)