Fedora convert .deb package to .rpm(网易云音乐)

参考链接:How to convert .rpm package to .deb?

失败

算是学习了一下吧,安装成功后播放音乐报错:网络连接错误。界面上的菜单等正常,下载正常,只是无法播放。在安装mp3解码器后,网页播放正常了,也就不继续向下探索了。(有没有可能是播放用的是网易自己的库呢?)

缘起

初用Linux作为主力开发及娱乐机器,上面的音乐播放器都不太懂。国内知名的音乐网站只有网易云音乐有Linux版本,可惜是ubuntu和deepin,只能学习试试能不能转换为rpm等Fedora安装包。

实战

参考网站上的高票答案提供了3种方案:

You need learn how to compile a program, is not difficult, if you provides me the source code, I can help you. But you need learn no?

3 ways
1) The correctly way

You need learn how to compile, and read the official guide here

2) Funny way

You can use fpm; read about fpm here

su -c 'yum -y install ruby-devel binutils dpkg-devel rpm-build libffi'

gem install fpm
if you have a debian package is very simple:

mkdir /tmp/installdir
cp -f myprogram.deb /tmp/installdir
cd /tmp/installdir
ar vx mypackage.deb
tar -xzvf data.tar.gz
rm -f control.tar.gz data.tar.gz debian-binary
The line using fpm, magic no?

You need change to name you want, and the version "1.1" to ??; also your name; email, url and license, no delete the quotes. Also you need write a simple description (change the example). and finally write all dependencies; example the next line I need java then -d 'java >= 6' , you can put all necessary. Remember no delete the quotes!

fpm -s dir -t rpm -p myprogram-VERSION_ARCH.rpm -n myprogram -v 1.1 -m "Juan Camaney <juancamaney at gmail dot com>" --license "GPLv3" --url http://miprogram.edu --description "My program is..." -d 'java >= 6' -C /tmp/installdir usr/
3) Alien way

It can cause problems, I broke my system by installing an rpm, I created with alien...

su -c 'yum -y install alien fakeroot'
fakeroot alien -r myprogram.deb

fedora23(本机):
我选择了第二种方案:

  1. 执行命令,安装依赖:dnf -y install ruby-devel binutils dpkg-devel rpm-build libffi,应该是dnf -y的原因,它会直接下载没有确认的过程。

  2. 安装fpm,gem install fpm,其中gem是ruby的包管理工具。

  3. 下载网易云音乐的deb包,地址,我用的是浏览器下载。

  4. 创建新的子目录mkdir /tmp/installdir

  5. 复制安装文件到子目录cp -f /home/tuanjie/下载/netease-cloud-music_1.0.0_amd64_ubuntu16.04.deb /tmp/installdir/

  6. 跳转到子目录cd /tmp/installdir/

  7. 抽取或者打包(?)`ar vx netease-cloud-music_1.0.0_amd64_ubuntu16.04.deb
    x - debian-binary x - control.tar.gz x - data.tar.xz`

  8. 现在installdir就有提取的deb安装包的具体内容了

  9. 解压 xz文件xz -d data.tar.xz

  10. 解压tartar -xvf data.tar

  11. 移除rm -f control.tar.gz debian-binary

  12. 不求深解的一个命令: fpm -s dir -t rpm -p netease-cloud-music_1.0.0.rpm -n netease-cloud-music -v 1.0.0 -m "tuanjie.netease" --url http://163.com --description "nettase cloud music" -d 'java >= 6' -C /tmp/installdir/ usr/

  13. 结果:Created package {:path=>"netease-cloud-music_1.0.0.rpm"}

  14. 安装rpm rpm -ivh netease-cloud-music_1.0.0.rpm

  15. 执行失败,缺少qt包:`netease-cloud-music
    /usr/lib/netease-cloud-music/netease-cloud-music: error while loading shared libraries: libQt5X11Extras.so.5: cannot open shared object file: No such file or directory`

  16. 安装qt5 x11dnf install qt5-qtx11extras.x86_64

  17. 还是缺包。。。。。。。。。。。。。。。(/usr/lib/netease-cloud-music/netease-cloud-music: error while loading shared libraries: libQt5Multimedia.so.5: cannot open shared object file: No such file or directory),有点气擂阿

  18. 安装qt5-multimediadnf install qt5-qtmultimedia.x86_64

  19. 崩溃了,/usr/lib/netease-cloud-music/netease-cloud-music: error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory

  20. 权限问题`netease-cloud-music
    Qt: Session management error: None of the authentication protocols specified are supported`,使用非root登录即可。

  21. 完工了,下面还有一个问题:启动的时候只能用命令,不知道怎么加到启动菜单里面。

搜狗输入法(待补充)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值