[Solved] A chore : Can't install Core!

Issues with installing under all GNU/Linux Distributions
Post Reply
adoward
Posts: 2
Joined: Sat May 24, 2008 4:57 pm

[Solved] A chore : Can't install Core!

Post by adoward »

Hi I'm new to Linux
Operating Java separately before installing OO.
When I try rpm -ivh *rpm I get this message then installation stops.
package jre-1.6.0_06-fcs (which is newer than jre-1.6.0_04-fcs) is already installed

I can't install the RedHat office integration because of dependency problems.
I Tried to install each rpm separately starting with [openoffice.org-core01-2.4.0-9286.i586.rpm] but it doesn't work : error: Failed dependencies:

Can you help me past that first step of installing core with a fresher java version already installed ?
If I misdiagnosed the problem plese be kind to let me know.

Thanks,
Last edited by Hagar Delest on Mon Jun 09, 2008 5:40 pm, edited 2 times in total.
Reason: tagged the thread as Solved.
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: A chore : Can't install Core!

Post by acknak »

Just skip the (older) Java rpm that comes with OOo: either delete it (you should still have it in the archive file that you downloaded from OO.org), or rename it (e.g. mv jre-1.6.0_04-fcs___.rpm jre-1.6.0_04-fcs___.rpm.NOINSTALL).

Then, run the usual "rpm -ivh *.rpm".

Or, if you want to get fancy, you can skip it in one go, like this:
# rpm -ivh `ls *.rpm | grep -v jre`

You can't install one package at a time because they are inter-dependent. When you install all at once, rpm will understand that all the dependencies are satisfied.
AOO4/LO5 • Linux • Fedora 23
adoward
Posts: 2
Joined: Sat May 24, 2008 4:57 pm

Re: A chore : Can't install Core!

Post by adoward »

This was an excellent reply.
Thank you.

But I still want to understand the fancy way:
Is this right ?
# rpm -ivh `ls *.rpm | grep -v jre`
rpm -- command
-ivh -- install verbose help
what's 'ls and |grep -v ?


And,Oh: Everything unpacked nicely including the redhat menu.
And I rebooted to get the new menus to work. Have a security warning to solve but I'm sure it will be fine.
This is a solved question.
Thanks ag
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: [Solved] A chore : Can't install Core!

Post by acknak »

Here's the basic form of the command:
# rpm -ivh p1.rpm p2.rpm p3.rpm...
This runs the rpm command with the options i, v, & h and the package file names p1.rpm, etc. The i option is "install"; the others are "verbose" and "hash" (progress indicators). So this installs all the packages given on the command line, and gives us some informative feedback while doing so.

Our problem here is the list of package files: we want to specify all the rpm files except the jre package. We can specify all the packages using "*.rpm" but there's no wildcard to specify all except...

Of course, we could just type all the package file names in and omit the one we don't want, but that's a tedious bit of effort we'd like to avoid.

Let's look at the commands in the back-quotes.
# rpm -ivh `ls *.rpm | grep -v jre`
The ls command lists file names; "ls *.rpm" will print a list of all the files whose names end in ".rpm". That list still includes the jre rpm, so we haven't gotten far yet. We need some way to remove the jre rpm from the list.

Next we take the output list and send it to grep. Grep normally scans it's input and prints only lines that match a pattern, but here we give it the "-v" option, which inVerts the operation: print only lines that don't match. So grep will filter out any line that contains the string "jre".

So between the back-quotes, we have two commands working together to generate a list of all the rpm file names except the jre package.

The back-quotes tell the command shell to run the ls... | grep... commands, then take their output (our list of package files) and pass it to the rpm command as if we had typed the package names ourselves on the command line.

It's a little tough to see at first, but it's such a handy technique that it's become something an idiom for most unix command line jockeys.
AOO4/LO5 • Linux • Fedora 23
Post Reply