失败
算是学习了一下吧,安装成功后播放音乐报错:网络连接错误。界面上的菜单等正常,下载正常,只是无法播放。在安装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 wayYou 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 wayIt 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(本机):
我选择了第二种方案:
执行命令,安装依赖:
dnf -y install ruby-devel binutils dpkg-devel rpm-build libffi
,应该是dnf -y的原因,它会直接下载没有确认的过程。安装fpm,
gem install fpm
,其中gem是ruby的包管理工具。下载网易云音乐的deb包,地址,我用的是浏览器下载。
创建新的子目录
mkdir /tmp/installdir
复制安装文件到子目录
cp -f /home/tuanjie/下载/netease-cloud-music_1.0.0_amd64_ubuntu16.04.deb /tmp/installdir/
跳转到子目录
cd /tmp/installdir/
抽取或者打包(?)`ar vx netease-cloud-music_1.0.0_amd64_ubuntu16.04.deb
x - debian-binary x - control.tar.gz x - data.tar.xz`现在installdir就有提取的deb安装包的具体内容了
解压 xz文件
xz -d data.tar.xz
解压tar
tar -xvf data.tar
移除
rm -f control.tar.gz debian-binary
不求深解的一个命令:
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/
结果:
Created package {:path=>"netease-cloud-music_1.0.0.rpm"}
安装rpm
rpm -ivh netease-cloud-music_1.0.0.rpm
执行失败,缺少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`安装qt5 x11
dnf install qt5-qtx11extras.x86_64
还是缺包。。。。。。。。。。。。。。。(
/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
),有点气擂阿安装qt5-multimedia
dnf install qt5-qtmultimedia.x86_64
崩溃了,
/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
权限问题`netease-cloud-music
Qt: Session management error: None of the authentication protocols specified are supported`,使用非root登录即可。完工了,下面还有一个问题:启动的时候只能用命令,不知道怎么加到启动菜单里面。