[HOW TO] install the rpm auto install dependencies

Morning,

I am a newbie with Fedora. A long time before I used the CentOS as system administrator with a little administrative.

Yesterday I re-installed my computer with Fedora 21. Today morning I must use KingOffice to write the Documentation. And I?

Install the KingOffice, but ...

[itien@localhost Downloads]$ rpm -Uvh wps-office-9.1.0.4945-1.a16p3.i686.rpm
error: Failed dependencies:
    libICE.so.6 is needed by wps-office-9.1.0.4945-1.a16p3.i686
    libSM.so.6 is needed by wps-office-9.1.0.4945-1.a16p3.i686
    libX11.so.6 is needed by wps-office-9.1.0.4945-1.a16p3.i686
    ......

    libz.so.1 is needed by wps-office-9.1.0.4945-1.a16p3.i686
    libcups.so.2 is needed by wps-office-9.1.0.4945-1.a16p3.i686
    libpng12.so.0 is needed by wps-office-9.1.0.4945-1.a16p3.i686


Googled, I knows the solution to resolve. I need a repositories on local.

1. Create a directory for local repository e.g. /home/itien/repo
2. Move the rpms package into here
3. Set ownership and firesystem permissions:
#chown -R your_user:your_user /home/user/repo

4. Install the createrepo package
[itien@localhost ~]$ sudo yum install createrepo_c.x86_64 createrepo_c-devel.x86_64 createrepo_c-libs.x86_64
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * fedora: ftp.kaist.ac.kr
 * rpmfusion-free: mirror.bjtu.edu.cn
 * rpmfusion-free-updates: mirror.bjtu.edu.cn
 * rpmfusion-nonfree: mirror.bjtu.edu.cn
...
---> Package sqlite-devel.x86_64 0:3.8.7.4-1.fc21 will be installed
--> Running transaction check
---> Package popt-devel.x86_64 0:1.16-5.fc21 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

#createrepo /home/user/repo
#chmod -R o-w+r /home/user/repo

5. Create a repository configuration

#vi /etc/yum.repos.d/itien.repo

[local]
name=your_name_repo
baseurl=file:///home/user/repo
enabled=1
gpgcheck=0

6. Now you can install the rpm package which you can not install before.
#yum install your_rpm_package

-
Tien

0 nhận xét:

Post a Comment