Loading ...
Sorry, an error occurred while loading the content.

RPM problem

Expand Messages
  • Godwin Stewart
    Hi list, I started using a RH distro only a couple of weeks ago, so please bear with me if the question sounds stupid. The Samba daemon refused to start
    Message 1 of 7 , May 1, 2001
    • 0 Attachment
      Hi list,

      I started using a RH distro only a couple of weeks ago, so please bear
      with me if the question sounds stupid.

      The Samba daemon refused to start properly, so my first reaction was to
      reinstall the package and hope that solved things. I've since solved the
      problem realising that Samba wasn't to blame, but netcfg had removed an
      entry in my /etc/hosts file, but while trying to reinstall Samba via rpm
      (hence the message to this list) I came across an oddity.

      # rpm -U <package>.rpm
      Error: <package> is already installed

      Very odd... I thought the -U switch was used to unconditionally
      overwrite anything in place. Let's try uninstalling it first and seeing
      if that helps

      # rpm -e <package>.rpm
      Error: <package> is not installed

      So what's the deal here? Is the package installed or not? I would tend
      to say that it *is* installed because it's working (sounds logical...)

      How is it that rpm can't decide whether the package is installed or not?

      This doesn't happen with just the Samba package, it happens with *any*
      package. This leads me to believe that I'm typing the wrong command line
      options, or that there is a deep-down problem with the whole RPM system.

      Any ideas?

      Thanx in advance.

      --
      __________________________________________
      G. Stewart -- godwin.stewart@...
      Port de Pontille, FR-37500 CHINON, FRANCE.
      __________________________________________
    • Brian L. Johnson
      ... Did you *configure* samba? You can do so by running swat as root, then going to your browser and entering the URL http://127.0.0.1:901 When prompted for
      Message 2 of 7 , May 1, 2001
      • 0 Attachment
        On May 1, Godwin Stewart wrote to redhat@yahoogroups.com:

        >The Samba daemon refused to start properly, so my first reaction was to
        >reinstall the package and hope that solved things. I've since solved the
        >problem realising that Samba wasn't to blame, but netcfg had removed an
        >entry in my /etc/hosts file, but while trying to reinstall Samba via rpm
        >(hence the message to this list) I came across an oddity.

        Did you *configure* samba? You can do so by running swat as root, then
        going to your browser and entering the URL http://127.0.0.1:901 When
        prompted for username, enter root and your root password

        ># rpm -U <package>.rpm
        >Error: <package> is already installed
        >Very odd... I thought the -U switch was used to unconditionally
        >overwrite anything in place. Let's try uninstalling it first and
        >seeing if that helps

        No, that is not correct. The "-U" switch means upgrade. If you want to
        overwrite a package, use the "--force" switch.

        ># rpm -e <package>.rpm
        >Error: <package> is not installed
        >So what's the deal here? Is the package installed or not? I would tend
        >to say that it *is* installed because it's working (sounds logical...)

        Onit ".rpm", you pass RPM only the package name, eg, "rpm -e <package>"

        >This doesn't happen with just the Samba package, it happens with *any*
        >package. This leads me to believe that I'm typing the wrong command line
        >options, or that there is a deep-down problem with the whole RPM system.

        I recommend some reading... Start with the man page for RPM, and then
        read the book "Maximum RPM" by Redhat. Available on the net in PDF
        format, or in HTML at http://rpmdp.org

        -=Brian L. Johnson, www.blj8.com=-
        Total Bookmarks in file= 8581
        ---------------------------------
        For PGP key email to: pgpkey@...
        For Geekcode email to: geekcode@...
      • Godwin Stewart
        ... Thanks for the info. The problem didn t lie with Samba in fact. I have several domain names pointing to the same IP number in my /etc/hosts file, the most
        Message 3 of 7 , May 1, 2001
        • 0 Attachment
          "Brian L. Johnson" wrote:

          > Onit ".rpm", you pass RPM only the package name, eg, "rpm -e <package>"
          >
          > I recommend some reading... Start with the man page for RPM, and then
          > read the book "Maximum RPM" by Redhat. Available on the net in PDF
          > format, or in HTML at http://rpmdp.org

          Thanks for the info.

          The problem didn't lie with Samba in fact. I have several domain names
          pointing to the same IP number in my /etc/hosts file, the most important one
          of which (my hostname) was removed when I used netcfg to reconfigure a ppp
          service. I added the line manually and Samba (and X) was running fine again.

          I did, in fact, start by reading through the man pages for rpm, but
          obviously not in great detail because I overlooked the --force option. I
          did, however, find the -e switch, and the man pages I have *don't* tell you
          to omit the .rpm extension unless you go away for a couple of hours, come
          back nice and fresh, and realize you're being told the syntax is:

          rpm -e <package_name>

          and *not*

          rpm -e <package_file>

          Duh...... [smashing head on nearest wall]

          Thanks again, and I certainly will investigate "Maximum RPM".

          --
          __________________________________________
          G. Stewart -- godwin.stewart@...
          Port de Pontille, FR-37500 CHINON, FRANCE.
          __________________________________________
        • Peter Hummers
          ... -U _updates_ the installed package (used with newer versions of packages that are already installed) ... ... You can see if RPM thinks a package is
          Message 4 of 7 , May 1, 2001
          • 0 Attachment
            --- Godwin Stewart <godwin.stewart@...> wrote:
            > ... but while trying to
            > reinstall Samba via rpm
            > ... I came across an
            > oddity.
            >
            > # rpm -U <package>.rpm
            > Error: <package> is already installed
            >
            > Very odd... I thought the -U switch was used to
            > unconditionally
            > overwrite anything in place. Let's try uninstalling

            -U _updates_ the installed package (used with newer
            versions of packages that are already installed) ...

            > # rpm -e <package>.rpm
            > Error: <package> is not installed
            >
            > So what's the deal here? Is the package installed or
            > not? I would tend
            > to say that it *is* installed because it's working
            > (sounds logical...)

            You can see if RPM thinks a package is installed by
            doing

            rpm -q <package>

            (-q is for query; don't use the .rpm extension here.)

            Have you looked at the rpm man pages? Pretty
            extensive, and should clear up command-line questions

            =====
            -Peter Hummers

            __________________________________________________
            Do You Yahoo!?
            Yahoo! Auctions - buy the things you want at great prices
            http://auctions.yahoo.com/
          • Michael Klinteberg
            Hi again I have a problem with RPM. If I wish to install some package it depends on some other package. Most of the time is says what package I need to
            Message 5 of 7 , Jun 8 2:36 AM
            • 0 Attachment
              Hi again

              I have a problem with RPM.
              If I wish to install some package it depends on some other
              package. Most
              of the time is says what package I need to install, but
              sometimes it
              says what file that is needed.

              I know that
              # "rpm -qlp *.rpm |grep my_missing_file"
              will output
              "my_missing_file"
              But I still don't know witch package it is. I tried
              # "rpm -qlp *.rpm | grep my_missing_file | xargs rpm -qip |
              less"
              But it didn't work either. :-(

              Is there any way to solve my problem?


              /Klintan
            • Jeff Lane
              ... The easiest way, add an echo like this: cd into the RPMS dir that has the RPMS you want to search. Could be on a CD or hard disk or whatever. then run
              Message 6 of 7 , Jun 8 10:14 AM
              • 0 Attachment
                On Fri, 8 Jun 2001, Michael Klinteberg wrote:
                > I know that
                > # "rpm -qlp *.rpm |grep my_missing_file"
                > will output
                > "my_missing_file"
                > But I still don't know witch package it is. I tried
                > # "rpm -qlp *.rpm | grep my_missing_file | xargs rpm -qip |
                > less"
                > But it didn't work either. :-(


                The easiest way, add an echo like this:

                cd into the RPMS dir that has the RPMS you want to search. Could be on a
                CD or hard disk or whatever. then run this lil script:

                # for x in *.rpm; do
                # echo $x >> files.txt;
                # rpm -qpl $x | grep my_missing_file >> files.txt;
                # done

                what this will do is echo the name of every rpm in that file and append
                that to a file called files.txt. Then, after echoing the name of the rpm,
                it will grep the -qpl of that rpm. IF the grep has a hit, it will append
                the line that has the path of the filename to files.txt immediately below
                the line that has the name of the rpm.

                THis puts it all into a file, so you can more, less, or pico or vi or
                whatever to search for what you seek. example:

                seeking /usr/lib/foobar.so

                run that script:

                <snip>
                somefile.rpm
                somefile1.rpm
                somefile2.rpm
                somefile3.rpm
                /usr/lib/foobar.so
                somefile4.rpm
                <snip>

                so, you would know that hte file you are looking for is part of
                somefile3.rpm.

                HTH

                --
                Jeffrey Lane, RHCX, EMT

                Red Hat, Inc. 919-547-0012
                www.redhat.com/support

                Education is what remains after one has forgotten everything he learned
                in school. -- A. Einstein
              • Michael Klinteberg
                That was very smart, you re the best. Thank you Jeff Lane. /Klintan ... From: Jeff Lane [mailto:jlane@redhat.com] Sent: Friday, June 08, 2001 7:15 PM To:
                Message 7 of 7 , Jun 8 12:54 PM
                • 0 Attachment
                  That was very smart, you're the best.
                  Thank you Jeff Lane.

                  /Klintan



                  -----Original Message-----
                  From: Jeff Lane [mailto:jlane@...]
                  Sent: Friday, June 08, 2001 7:15 PM
                  To: 'Redhat'
                  Subject: Re: [redhat] RPM problem

                  The easiest way, add an echo like this:

                  cd into the RPMS dir that has the RPMS you want to search.
                  Could be on
                  a
                  CD or hard disk or whatever. then run this lil script:

                  # for x in *.rpm; do
                  # echo $x >> files.txt;
                  # rpm -qpl $x | grep my_missing_file >> files.txt;
                  # done

                  what this will do is echo the name of every rpm in that file and
                  append
                  that to a file called files.txt. Then, after echoing the name
                  of the
                  rpm,
                  it will grep the -qpl of that rpm. IF the grep has a hit, it
                  will
                  append
                  the line that has the path of the filename to files.txt
                  immediately
                  below
                  the line that has the name of the rpm.

                  THis puts it all into a file, so you can more, less, or pico or
                  vi or
                  whatever to search for what you seek. example:

                  seeking /usr/lib/foobar.so

                  run that script:

                  <snip>
                  somefile.rpm
                  somefile1.rpm
                  somefile2.rpm
                  somefile3.rpm
                  /usr/lib/foobar.so
                  somefile4.rpm
                  <snip>

                  so, you would know that hte file you are looking for is part of
                  somefile3.rpm.

                  HTH

                  --
                Your message has been successfully submitted and would be delivered to recipients shortly.