Find the answer to your Linux question:
Results 1 to 7 of 7
Hi i have a question about repositories now i created a folder in my system where ill be placing all my rpms. The folder is /usr/local_repo I then ran the ...
  1. #1
    Just Joined!
    Join Date
    Oct 2011
    Posts
    67

    Unhappy Question about yum local repository

    Hi i have a question about repositories
    now i created a folder in my system where ill be placing all my rpms. The folder is /usr/local_repo
    I then ran the command createrepo /usr/local_repo as a result a folder called repodata appeared (which shows the command was a success). Now i went to /etc/yum.repos.d and added a file called fedora-local.repo
    The contents of which is

    [localrepo]
    name=Fedora Core $releasever - My Local Repo
    baseurl=file:///usr/local_repo/
    enabled=1
    gpgcheck=0
    #gpgkey=file:///path/to/you/RPM-GPG-KEY

    Now here is where things start going out of control. I then downloaded an rpm lets say its called rpm-fuse.rpm (I know I changed the name). Now the location of this file is /usr/local_repo/rpm-fuse.rpm
    Now in order to update the repository I ran the command
    createrepo /usr/local_repo/
    after that I ran the following command
    [zedan*localhost /]$ sudo yum install rpm-fuse.rpm

    I was expecting it to install the package and everything but I got the following

    Loaded plugins: langpacks, presto, refresh-packagekit
    Setting up Install Process
    No package rpm-fuse.rpm available.
    Error: Nothing to do

    Question ) Why did i get this ?? isnt the whole purpose of creating a local repository is to remove the need of connecting to the internet .. since the entire package is already present in my system. Could you tell me why this didnt work ?? Where did i go wrong ??

  2. #2
    Linux User glennzo's Avatar
    Join Date
    Sep 2004
    Location
    Salem, Mass
    Posts
    434
    You may need to use createrepo --update /usr/local_repo/ or createrepo --database /usr/local_repo/. Out of curiosity, does yum repolist show "local"?
    Glenn
    Powered by Fedora 16 and Arch Linux

  3. #3
    Just Joined!
    Join Date
    Oct 2011
    Posts
    67
    Does my repolist show local ?? What does that mean ?? sorry a bit confused??


    So here is what i did and still its not working

    [zedan*localhost local_repo]$ sudo createrepo --update /usr/local_repo/
    [sudo] password for zedan:

    Saving Primary metadata
    Saving file lists metadata
    Saving other metadata
    Generating sqlite DBs
    Sqlite DBs complete


    [zedan*localhost local_repo]$ ls
    garbageid repodata rpm-fuse.rpm

    [zedan*localhost /]$ sudo yum install rpm-fuse.rpm
    Loaded plugins: langpacks, presto, refresh-packagekit
    localrepo | 2.9 kB 00:00 ...
    localrepo/primary_db | 2.8 kB 00:00 ...
    updates/metalink | 14 kB 00:00
    updates | 4.7 kB 00:00
    updates/primary_db | 5.0 MB 00:08
    Setting up Install Process
    No package rpm-fuse.rpm available.
    Error: Nothing to do

    Why am i getting "No package rpm-fuse.rpm available." even though the pacakage is available ??? any ideas or suggestions??

  4. #4
    Just Joined!
    Join Date
    Sep 2011
    Posts
    15
    Well I have not tried this one but I think you need to update your yum repository

    #yum clean all

    #yum update
    then check whether the file you added is updated or not

    #yum list
    and if you don't find the package there then why don't you try installing the package manually through rpm
    #rpm -ivh (package name)

  5. #5
    Just Joined!
    Join Date
    Oct 2011
    Posts
    67
    Will try this.. and let you know.
    I know you could update or install packages using yum remotely.
    But just for an understanding I am interested in doing it this way..

  6. #6
    Trusted Penguin jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    4,071
    Quote Originally Posted by glennzo View Post
    Out of curiosity, does yum repolist show "local"?
    Quote Originally Posted by zedan85 View Post
    Does my repolist show local ?? What does that mean ??
    If you open up a terminal, and execute the command yum repolist, what is the entire output?
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.

  7. #7
    Linux Guru
    Join Date
    May 2011
    Posts
    1,843
    Based upon the output you've posted, it appears that your localrepo repo is at least being seen by yum. Is it possible that you already have a package of the same name that you're trying to install already installed? Renaming the file itself does not fool yum.

    Get the name of the rpm you renamed:
    Code:
    # get RPM package name
    rpmname=$(rpm -qp rpm-fuse.rpm --queryformat '%{name}')
    echo rpm name is $rpmname
    
    # see if already installed
    rpm -qv $rpmname
    If that last command returns the package name and version, then it is already installed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...