Intro to urpmi - Mageia 4

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

Intro to urpmi - Mageia 4

Postby kevinmcg » Mar 13th, '15, 16:38

Hello,

After some trying, I cannot understand how the dependency management works. I am trying to use a java x32 bit application on a Mageia 4 x64 bit VM. I have got it working by installing every last dependency by hand. I'd like to know how urpmi can manage this.

I am using java (jre1.7.0_75) downloaded from Oracles website and two of the main packages needed are;
* libgtk+2.0_0-2.24.22-3.mga4.i586.rpm
* libgtk+-x11-2.0_0-2.24.22-3.mga4.i586.rpm


Could someone explain the steps needed so that urpmi can install these packages as well as any dependencies?

Thanks in advance,

Kevin
kevinmcg
 
Posts: 4
Joined: Mar 13th, '15, 16:25

Re: Intro to urpmi - Mageia 4

Postby doktor5000 » Mar 13th, '15, 20:31

The dependencies in the package are either file-based dependencies on some specific filenames, or some arbitrary tags,
which can or can not be fulfilled by the packages that the distribution provides. Usually you would simply use urpmi to install
the rpm package, and it will automatically resolve all the dependencies that it can resolve.

For most 3rd-party packages that are not directly tailored to a specific distribution, you may need to install a few or all packages manually.

As you did not provide any command that you used or error messages that you encountered, cannot say more.
But the installation should not be an issue at all. Just simulated the installation here:

Code: Select all
┌─[doktor5000@Mageia5]─[19:29:00]─[~]
└──╼ sudo urpmi --test ./jre-7u75-linux-i586.rpm


SECURITY: The following package is _NOT_ signed (OK ((none))): ./jre-7u75-linux-i586.rpm
installing jre-7u75-linux-i586.rpm from .
Preparing...                     ################################################################################################################################################################################
Installation is possible


Please check our software management MAQeia for more information on software and package management.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18061
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Intro to urpmi - Mageia 4

Postby claire » Mar 15th, '15, 17:46

32bit libs and 64bit libs are named differently. 32bit use lib* and 64bit use lib64* so many can be installed concurrently.

"urpmi libgtk+2.0_0 libgtk+-x11-2.0_0" should install them for you. Generally though you can use options such as --media or --searchmedia to restrict urpmi to using a specific media or tell it to look there first.
Help to make Mageia! Get involved.. Please come and join us
claire
 
Posts: 161
Joined: May 28th, '11, 19:17
Location: UK

Re: Intro to urpmi - Mageia 4

Postby kevinmcg » Mar 17th, '15, 16:00

OK, thanks for the tips but I'm still stumbling along.

For example, I think this java package would be ideal;
ftp://ftp.cc.uoc.gr/mirrors/linux/magei ... 4.i586.rpm
So I did the following;
Code: Select all
sudo urpmi.addmedia --distrib ftp://ftp.cc.uoc.gr/mirrors/linux/mageia/distrib/4/i586

Code: Select all
$ sudo urpmi --debug ftp://ftp.cc.uoc.gr/mirrors/linux/mageia/distrib/4/i586/media/core/updates/java-1.7.0-openjdk-1.7.0.75-2.5.4.1.mga4.i586.rpm
getting lock on urpmi
parsing: /etc/urpmi/mediacfg.d/Official-4-i586
parsing: /etc/urpmi/mediacfg.d/Official-4-x86_64
examining synthesis file [/var/lib/urpmi/synthesis.hdlist.Core Release.cz]
examining synthesis file [/var/lib/urpmi/synthesis.hdlist.Nonfree Release.cz]
examining synthesis file [/var/lib/urpmi/Core Updates (distrib1)/synthesis.hdlist.cz]
examining synthesis file [/var/lib/urpmi/Nonfree Updates (distrib2)/synthesis.hdlist.cz]
examining synthesis file [/var/lib/urpmi/Core 32bit Updates (distrib4)/synthesis.hdlist.cz]
examining synthesis file [/var/lib/urpmi/Nonfree 32bit Updates (distrib5)/synthesis.hdlist.cz]
examining synthesis file [/var/lib/urpmi/Core Release2/synthesis.hdlist.cz]
examining synthesis file [/var/lib/urpmi/Core Updates/synthesis.hdlist.cz]
examining synthesis file [/var/lib/urpmi/Nonfree Release2/synthesis.hdlist.cz]
examining synthesis file [/var/lib/urpmi/Nonfree Updates/synthesis.hdlist.cz]
retrieving rpm file [ftp://ftp.cc.uoc.gr/mirrors/linux/mageia/distrib/4/i586/media/core/updates/java-1.7.0-openjdk-1.7.0.75-2.5.4.1.mga4.i586.rpm] ...
retrieving   java-1.7.0-openjdk-1.7.0.75-2.5.4.1.mga4.i586.rpm
'/usr/bin/curl' '-q' '-s' '--location-trusted' '-R' '-f' '--disable-epsv' '--connect-timeout' '60' '--anyauth' '--stderr' '-' '-O' 'ftp://ftp.cc.uoc.gr/mirrors/linux/mageia/distrib/4/i586/media/core/updates/java-1.7.0-openjdk-1.7.0.75-2.5.4.1.mga4.i586.rpm'
retrieved   java-1.7.0-openjdk-1.7.0.75-2.5.4.1.mga4.i586.rpm
...retrieving done
getting exclusive lock on rpm
opening rpmdb (root=, write=)
no packages match java-1.7.0-openjdk (it is either in skip.list or already rejected)
no packages match java-1.7.0-openjdk (it is either in skip.list or already rejected)
scheduled sets of transactions:
unlocking urpmi database
unlocking rpm database
EXITING (pid=4032)


Where should I go from here?

Cheers
kevinmcg
 
Posts: 4
Joined: Mar 13th, '15, 16:25

Re: Intro to urpmi - Mageia 4

Postby doktor5000 » Mar 18th, '15, 00:04

A few questions beforehand:

Why do you add a new set of repos just to install one package?
Why do you specify the full URL to that package, when you just need to provide the name?

Please provide the output of the following commands to get the relevant information about your system (they can all be run as normal user)
Code: Select all
uname -a
cat /etc/product.id
rpm -qa --qf "%{N}-%{V}.%{ARCH}\n"| grep -i -e java -e jdk -e jre | sort
urpmq --list-media active --list-url
grep -v -e ^# -e ^$ /etc/urpmi/skip.list
java -version
/sbin/alternatives --config java
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18061
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Intro to urpmi - Mageia 4

Postby kevinmcg » Mar 18th, '15, 12:36

1. Good question.
2. I am looking for the x32 bit version of java. As it is a x64 bit Mageia VM, my guess is that the x64 bit version of java will be installed by default.

After restoring the snapshot, here are the outputs;
Code: Select all
$ uname -a
Linux hostname 3.14.32-server-1.mga4 #1 SMP Sat Feb 7 01:23:00 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux


Code: Select all
$ cat /etc/product.id
vendor=Mageia.Org,distribution=Mageia,type=Basic,version=4,branch=Official,release=4,arch=x86_64,product=Default


Code: Select all
$ rpm -qa --qf "%{N}-%{V}.%{ARCH}\n"| grep -i -e java -e jdk -e jre | sort
java-1.7.0-openjdk-1.7.0.75.x86_64
java-1.7.0-openjdk-headless-1.7.0.75.x86_64
javapackages-tools-3.4.0.noarch
lib64javascriptcore-gir3.0-2.2.2.x86_64
lib64javascriptcoregtk1.0_0-2.2.2.x86_64
lib64javascriptcoregtk3.0_0-2.2.2.x86_64
liblog4j-java-1.2.17.noarch
python-javapackages-3.4.0.noarch
rootcerts-java-20141117.00.x86_64
timezone-java-2014f.x86_64


Code: Select all
$ urpmq --list-media active --list-url
Core Release cdrom://x86_64/media/core
Nonfree Release cdrom://x86_64/media/nonfree
Core Updates (distrib1) http://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/4/x86_64/media/core/updates
Nonfree Updates (distrib2) http://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/4/x86_64/media/nonfree/updates
Core 32bit Updates (distrib4) http://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/4/i586/media/core/updates
Nonfree 32bit Updates (distrib5) http://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/4/i586/media/nonfree/updates


Code: Select all
$ grep -v -e ^# -e ^$ /etc/urpmi/skip.list
No output...


Code: Select all
$ java -version
java version "1.7.0_75"
OpenJDK Runtime Environment (mageia-2.5.4.1.mga4-x86_64 u75-b13)
OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)


Code: Select all
$ /sbin/alternatives --config java

There is only 1 program which provides java
(/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.1.mga4.x86_64/jre/bin/java). Nothing to configure.
update-alternatives: unable to open /var/lib/rpm/alternatives/java.rpm-new for write: Permission denied
kevinmcg
 
Posts: 4
Joined: Mar 13th, '15, 16:25

Re: Intro to urpmi - Mageia 4

Postby jkerr82508 » Mar 18th, '15, 14:40

jkerr82508
 
Posts: 946
Joined: Mar 26th, '11, 01:34
Location: Fife, Scotland

Re: Intro to urpmi - Mageia 4

Postby kevinmcg » Mar 18th, '15, 17:43

Are the sources properly configured now?
Code: Select all
$ urpmq --list-media active
Core Release (distrib1)
Core Updates (distrib3)
Nonfree Release (distrib11)
Nonfree Updates (distrib13)
Core 32bit Release (distrib31)
Core 32bit Updates (distrib32)
Nonfree 32bit Release (distrib36)
Nonfree 32bit Updates (distrib37)


How can I install the x32 version of java? Should I remove this java and install a noarch version?
Code: Select all
$ sudo urpmi java-1.7.0-openjdk
Package java-1.7.0-openjdk-1.7.0.75-2.5.4.1.mga4.x86_64 is already installed
Marking java-1.7.0-openjdk as manually installed, it won't be auto-orphaned
writing /var/lib/rpm/installed-through-deps.list
kevinmcg
 
Posts: 4
Joined: Mar 13th, '15, 16:25


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest