Help - Search - Members - Calendar
Full Version: Linux Literacy Skills -- Version Info
Linuxhelp > Support > Technical Support
jeff_brown
Hi. I recetnly dove into an attempt to install a bunch of software on my machine, and I kind of bounced off it head-first. Many things say "In order to install me you'll need the latest lawnmower." I can often find a directory in my computer with a lawnmower, and even better sometimes with a lawnmower-2.4.5 or some+thing.

However, I don't know if merely finding the directory means that I have it entirely *installed*. Further, I don't know if the numbers after the lawnmower correspond to its own version number, or the version number of something it works with (like the kernel).

Also -- could it be that one's version of a library was "too new" to work with something that needed it?

And last -- I've seen what looks like a lot of symlink action going on. Is there more than one place a library can be installed such that other programs can use it? Do I have any reason to want to change where they go, or any ability to affect where they go?

But perhaps I'm getting ahead of myself. How can I know what I have?
hughesjr
Since you are using Mandrake 9.2, the first thing you should do is setup the program to do updates. This program is named urpmi.

Detailed instructions on how to set it up are here ... and here is a list of mirrors if Texas Tech University isn't very close (and how to do the addmedia entries for a different mirror).

Do the optional and the required steps from the first thread (picking a mrror that is close to you) .... the latest kernel is kernel-2.4.22.28mdk.

After the kernel upgrade and the kernel-source upgrade, you will need to reboot into the new kernel, and set up the kernel-source like you did before ... then recompile the network card drivers like you did before.

I just looked at the original post (that I made for you to get your wireless card working) on how to setup the kernel-source ... it will work as is, the only thing you might find is that the

cd /usr/src
ls -al


might show you a linux pointed to the wrong directory .... if that is the case, do this:

rm linux
ln -s linux-
xxxxxxmdk/ linux

where xxxxxx is the new kernel version you booted to ...

The follow the instructions (in my post to you originally to setup your wireless card) and you should be able to compile the drivers for the new kernel as well.
----------------
After everything is updated, you should be able to install any software that is part of Mandrake and it contib software (which is almost anything you need) with the command:

urpmi packagename

before you install any packages, you should update the urpmi media to take into account any updates like this:

urmpi.update -a
(if you are installing lots of packages, you only need to do that at the beginning of the install process)

You can get a list of all available packages with the command:
urpmq --list -r > filename

then edit the file...

If you are looking for a specific package (I'll assume MySQL), this would work to see everything:

urpmq --list -r | grep -i mysql

You can get info about a specific package like this as well:

[b]urpmq -fi
packagename

You can get a list of all installed packages like this:

rpm -qa

You can get info about a specific installed package like this:

rpm -qipackagenname

...the output of rpm -qi gcc on my machine is:
CODE
[root@localhost src]# rpm -qi gcc
Name        : gcc                          Relocations: (not relocateable)
Version     : 3.3.1                             Vendor: MandrakeSoft
Release     : 2mdk                          Build Date: Mon 01 Sep 2003 07:50:28 AM CDT
Install Date: Sat 03 Jan 2004 01:34:25 PM CST      Build Host: hp6.mandrakesoft.com
Group       : Development/C                 Source RPM: gcc-3.3.1-2mdk.src.rpm
Size        : 13031289                         License: GPL
Signature   : DSA/SHA1, Mon 01 Sep 2003 09:25:15 AM CDT, Key ID e7898ae070771ff3Packager    : Gwenole Beauchesne <gbeauchesne@mandrakesoft.com>
URL         : http://gcc.gnu.org/
Summary     : GNU Compiler Collection
Description :
A compiler aimed at integrating all the optimizations and features
necessary for a high-performance and stable development environment.
This package is required for all other GCC compilers, namely C++,
Fortran 77, Objective C and Java.

If you have multiple versions of GCC installed on your system, it is
preferred to type "gcc-$(gcc3.3-version)" (without double quotes) in
order to use the GNU C compiler version 3.3.1.


You should always install pakages that were made for mandrake using urmpi first ... and if there isn't one available that way, then build it from source....
jeff_brown
You're response was thorough and I appreciate it. However I'm afraid it's not relevant to my situation. I already have a utility called RPMDrake that seems to handle RPMs quite well -- it even goes online and looks up what needs updating.

What was worrying me is whether I am irrevocably tied to RPM. I realize that if I tried installing something using RPM, I can look it up in the aforementioned utility and if it's there, then it's installed. Unfortunately, I am putting a lot of little audio-manip programs on here, and they're not all available as RPM.

Suppose I tried installing something without RPM. Is there an easy way to find out if the install was successful, and if so, what version it is at?

So far the only technique I know of is to find a directory containing the name of the program. If I find it, I look at its contents, and if they look like exectuables, I tend believe it was installed. Further, if the title has a number appended, I try to assume that is its version. But could that number be the version of the kernel it's designed to work with? (E.g. sox-2.0 would get stuck in a directory called sox-2.6.2 because it's designed to work with the 2.6.2 linux kernel?)

That generally works okay, but it seems awfully clunky. I'd like to know if there is anything in place globally that keeps track of all the installed software, RPM or otherwise.
hughesjr
There is no way of tracking without rpms (on Mandrake) ... and RPM was designed for that purpose. You must manually keep up with what versions you have if you install from source. (Actually, you could build your own RPMs from source and then install those).

What is even a bigger problem is that if you install anything that is not an RPM, it isn't in your RPM database when you finish, so it won't resolve dependancies for other items later. Example ... I want to install Gnome 2.6 , but there is no RPMs ... just source code. I download and install Gnome 2.6 via source ... (I first removed all the Gnome 2.4 rpms). Everything is working ... great. Now I want to install a new mediaplayer from an RPM, but it requres Gnome > 2.4 ... and I have no Gnome RPMS in my database (since I built Gnome 2.6 from source) .. so now, I have to install the new program from source as well. Pretty soon, I have to install everything from source.
---------------------------
RPMDrake is a GUI frontend for urpmi ... it is easier, but it isn't quite as powerful. I personally don't like gui package installers for any Linux ... but I can see how some people do.
jeff_brown
Thanks for the warning! I will proceed with caution.

Alas, for some of the functionality I want, I have no choice but to install from source. I'll just try not to install from source anything that might be needed by another program.
hughesjr
OK ...

As a way to keep track of what you install manually, you can put it in /usr/src/program-version .... and keep it there until you upgrade ...

Some (but not many) progams have a make uninstall.

Make sure to check the contrib hive of the mandrake mirror ... there are lots of extra packages there...
jeff_brown
[The follwoing post easily falls under this subject heading, but veers away from the preceding RPM discussion.]

I can't tell if my sound card is going through ALSA drivers or OSS ones. I have files for both, and directories for alsa. Dave Phillips, high-pries of linux audio software, says "If you're running OSS, look at /dev/sndstat ... If ALSA, look at /proc/asound/cards and /proc/modules". On my machine the last file is empty, and the other two don't exist. Yet I can play MIDI files through Timidity, so I'm sure SOMETHING WORKS. Again, I just don't know what.

It seems realy unlikely to me that there wouldn't be some directory or file that keeps track of all the drivers Linux is running, yet I've heard no mention of any such thing.
jeff_brown
First Apology
On second appraisal, my post before this probably belonged elsewehre. I would delete it if I knew how.

Second Apology, and Explanation
In the beginning of this thread, you posted instruction for how to upgrade my kernel. In a previous post, you suggested Mandrake 10 Community. I avoided the subject both times, partially because I wasn't sure how much help it would be, but also partially out of fear -- it sounded like a big scary thing to do. However, I have run into so many problems with my current setup (9.1, 8 months old now) that I may soon become convinced that such a big, scary move would in fact be wise.

My biggest problems are software installs. I have tried to install a lot of software -- like twelve programs or something -- and aside for netscape and scons, every single install has ground to a halt. Most often, either my libraries can't be updated without removing other software that needs the old versions, or the RPM manager doesn't recognize that a package has been installed.

Before blaming the age of my kernel and distribution, there is one problem that seems like it might be easily fixed. I have come across the following problem three or four times: I install an RPM, and then I can't find it! Witness the following atrocity:

[root@localhost pre-install]# urpmi audacity-1.2.0-0.pre2.1mdk.src.rpm
Everything already installed
[root@localhost pre-install]# rpm -q audacity
package audacity is not installed

[I took your advice and moved from the Mandrake frontend to the command line. And thanks for pointing out how not-maintained yarec was -- I had no idea!]

If I solved this problem, then I might prefer to stick with my less-supported versions of things than to risk breaking everything by going for the gold. Otherwise I'll probably just go to the Saturday LUG in Simi Valley and update everything.
hughesjr
You have the SRC rpm installed (that is the source rpm) ... do:

urpmi audacity

Source RPMs can be used to build the binary (installable) rpm ... but in this case, you can just install it with urpmi.

I did my install on mandrake 10.0 and it installed the binary rpm. If yours doesn't do that in 9.2, I can post how to build the binary RPM from the SRC rpm ... but you might have to download some other RPMS to build it.
jeff_brown
After learning a bit about the shell rpm utilities, I discovered that I do not have urpmi configured to update from the net. I followed your (hughesjr's) instructions on how to configure urpmi, and got quite far (although I didn't finish). Now I have a few questions about RPMs in general, as well as a (probably easy to fix) place I'm stuck at in the update process.

General Questions on RPMs
(This is a very compound question.) When I'm getting new software, I know that a package aimed at plain Mandrake, with a plain title, will generally work. How much leeway do I have? If I need libkdevelop, will libkdevelop.so.2 work just as well? If a program *tells* me it needs "wavtools = 0.14", will a higher version work? If I get a package (say wavtools) with the word 'devel' in it, does that include wavtools, or does it need wavtools already installed?

How do you uninstall rpm source? I got an alpha package of the form "audacity....src...rpm" installed, and after that I called urpmi audacity, which apparently built the executable. Then I uninstalled audacity (way buggy), but I think the audacity-src might still be in there. This makes me hesitant to install the more stable version, because there might be library conflicts, no?

My Adventures
Apparently with success, I ran urpmi.removemedia -a.

I found these mirrors that are close to me (highest is closest):

ftp.cs.ucr.edu/pub/mirrors/mandrake/official/Mandrake/9.1/i586 (Cali)
mirrors.usc.edu/pub/linux/distributions/mandrake/9.1 (Cali)
mirrors.xmission.com/mandrake/9.1/i586/ (Utah)

Q: They all seem like good sites. Below I've only dealt with ucr, but can I list the other two as alternate sources to urpmi? Would that redundancy be good, or would it lead to inconsistencies or incompatibilities?

I searched ucr and found what I'm fairly certain are the corresponding directories for contrib, CD1, CD2 and Mandrake-updates:

/pub/mirrors/mandrake/official/Mandrake/9.1/contrib/i586
/pub/mirrors/mandrake/official/Mandrake/9.1/i586/Mandrake/RPMS
/pub/mirrors/mandrake/official/Mandrake/9.1/i586/Mandrake/RPMS2
/pub/mirrors/mandrake/official/Mandrake/updates/9.1/RPMS

Q: That's only 4 things. When I "removed media", there were 10 entries -- international, supplementary apps, commercial apps, installation sources *and* an update_source. (Possibly relevant: I use Mandrake 9.1, not 9.2.) Are all my bases covered?

I constructed the incredibly hard to read commands, and successfully linked CD1 and CD2 to their respective directories.

Q: In your instructions, you had Disk_1 and Disk_3, corresponding to directories RPMS and RPMS3. I changed every 3 to a 2. That's cool, right?

Linking to the contrib source failed. Here's what I did:

CODE

[root@localhost pre-install]# urpmi.addmedia contrib ftp://ftp:anonymous@ftp.cs.ucr.edu/pub/mirrors/mandrake/official/Mandrake/9.1/contrib/i586 with synthesis.hdlist.cz
added medium contrib
retrieving description file of "contrib"...
retrieving source hdlist (or synthesis) of "contrib"...       ftp://ftp:xxxx@ftp.cs.ucr.edu/pub/mirrors/mandrake/official/Mandrake/9.1/contrib/i586/synthesis.hdlist.cz
...retrieving failed: curl failed: exited with 19 or signal 0
retrieve of source hdlist (or synthesis) failed
no hdlist file found for medium "contrib"
examining synthesis file [/var/lib/urpmi/synthesis.hdlist.contrib.cz]
problem reading synthesis file of medium "contrib"
unable to update medium "contrib"


Q: In your (hughesjr's) instructions, the "with"-clause for the contrib CD was missing the phrase "../base". Could that be the problem?

For reference, the four with clauses were
with synthesis.hdlist.cz
with ../base/synthesis.hdlist.cz
with ../base/synthesis.hdlist2.cz /// I changed the 3 to a 2, displayed here
with ../base/hdlist.cz

Q: I did not go on to change update_source, under the suspicion that updating the kernel might go better if I updated the other things first. Correct? Incorrect? Irrelevant?

As always, I am intensely grrateful for your help.
hughesjr
I have looked at the 9.1 site (ftp.cs.ucr.edu) and contrib is just a symlink to RPMS2 ... so you should only need to add RPMS, RPMS2, and update

So ..... if you have those working, you can do:

urpmi.removemedia contrib

If you have RPMS, RPMS2 and update, then you have all the official Mandrake 9.1 files and the contrib files for 9.1.
jeff_brown
Hello! Happy Spring Break!

My saga bumbles steadily along. I've kind of got the update thing going, but kind of not. I also have a few more questions on rpms generally.


The Update on Updates

History of Changes:
I did as you said, and now if I understood correctly urpmi has all the media sources it needs for Mandrake 9.1: Disc_1, Disc_2 and update_source, from ftp.cs.ucr.edu. After setting those up, I ran the following sequence of commands:

urpmi.update -a
uprmi --auto-select
update kernel-2.4.21.0.28mdk*
urpmi kernel-source

(*While I was never able to find a direct statement to this effect, I convinced myself through lookiing around that this was the latest kernel for Mandrake 9.1. If I'm wrong, let me know.)

Current Situation:
Those changes went without a hitch. You warned that in /usr/src, linux might point to the wrong directory. It doesn't, but it does:

I don't know what /usr/src contained prior to my running update-kernel. Now it contains two rival directories, linux...13.mdk and linux...27.mdk -- neither of which ends in .28, the kernel I thought I had updated to. Linux points to .27. However, running uname -r still gives me this:

2.4.21-0.13mdk

Knowing nothing, I am unable to diagnose.


Two less situational, more sustained use questions

rpm and urpmi
What should be my pimary manner now of using rpm and urpmi? If I understand correctly, whenever I see something I want, I should download the rpm, install it with the normal rpm command. If I see something I want that is an update to something I already have, I can just type "urpmi.update -a" and everything I own will be updated, so in particular the thing I was looking at will be updated. Am I correct, or is this more or less work than I really have to do?

src rpms
I've been in the habit of installing the src rpms, taking a sort of superstitious comfort in being "closer to the real thing'. Somebody at the LUG I went to Saturday said that I probably should use the "straight images" rather than the source, if I don't plan on mucking with code, because it creates more work. I plan to follow his advice in the future, but I still have my past errors to resolve:

If I have installed a file "name...src...rpm" via regular shell rpm, I should be able to then declare "urpmi name" and have the real program installed, correct? That's what I've done with most src rpms, but at least one of them has refused to work that way. I would just uninstall the src rpm and install a straight image, but I don't know how; that's my next question.

If I install "name...src...rpm", I've found that I can't query it with "rpm -q name", because that's not it's name. How can I query it? How can I uninstall it?


I hope all is well on your side of the internet / universe.
hughesjr
The latest kernel I see on the website is this: kernel-2.4.21.0.27mdk

I would just download it and install via:

rpm -Uvh kernel-2.4.21.0.27mdk-1-1mdk.i586.rpm
-----------------------------------------------------------------------
When you use rpm -q, you have to know the full name ... but you can do this:

rpm -qa | grep -i part_of_name

rpm -qa lists all installed programs ... grep will filter only the lines that contain the text in part_of_name ...grep is normally case sensitive, but the grep -i is not case sensitive ... so if you did:

rpm -qa | grep -i mysql

then things named MySQL, mysql, Mysql, etc., would all show up in the results.

and this will tell you all your src rpms:

rpm -qa | grep -i src

-------------------
When removing the rpms, use the command:

rpm -e package_name

(as shown by rpm -qa | grep -i package ... don't use a .rpm on the end)
jeff_brown
Hmm. I lost X. However, I did manage to upgrade the kernel.

Recall that a few days ago I ran "urpmi kernel.xxx", and then "urpmi kernel-source". Whatever that did, I did not undo or uninstall. Should I have?

Anyway, I downloaded and installed the latest kernel via console rpm. Upon rebooting, Mandrake's nice graphical display now goes into fits; I believe it is trying screens that don't work, and then retreating to a previous routine. Eventually it lets me log into a dry console, whereupon "uname -r" reveals kernel version 2.4.21.0.27, and the command "X" yields this:

(EE) NVIDIA(0): Failed to initialize the NVidia kernel module.
(EE) NVIDIA(0): ***Aborting***
(EE) NVIDIA(0): Screens found but none have a usable configuration

Fatal server(?) error:
No screens found

(Might not have been the word "server". I can't read my writing.)

I tried pointing /usr/src/linux at /usr/src/kernel.xxx.13 instead of .27. No dice: when I rebooted my gesture was ignored, and .27 came up again.

The graphical error looks very similar, maybe identical, to a problem I had once when I tried to adjust to a lower resolution. I used some Drak GUI, and when I rebooted, I got the same fits and starts, and the same "no screens usable" error. Then I fixed it by putting some of the contents of a backup config file into the "current" (broken) config file. I'm tempted to try the same thing again, but I'm afraid of breaking it more, so I thought I'd get another opinion first.

When someone updates their kernel, how much software do they have to reinstall? Everything, or just drivers? My goal in doing this was to get ALSA to work, but if it doesn't significantly increase my chances of that, maybe I should retreat. Is that possible? If I never uninstalled kernel xxx.13, can I still use it?
Robert83
Hi,

whenever you upgrade your kernel to a newer version,
you'll need to recompile your modules for that kernel, so get the sources for the new kernel,
and install NVIDIA display driver again, and it should work.

you only need to install modules, which you previously compiled for that older kernel.
[such as display drivers, sound card drivers[if a external module was used, such as nvaudio] ...
softwares usualy work with newer kernels without any problems [unless some major kernel update is done, for example move from 2.4.x to 2.6.x , some software might stop functioning]

Sincerely
Robert B
jeff_brown
I discovered that I have the following rpms installed. (N stands for 2.4.21.0)

kernel-N.13.mdk-1-1mdk
kernel-N.17.mdk-1-1mdk
kernel-source-N.27.mdk
NVIDIA_kernel-N.13mdk-4321-3mdk

So to get the display working again, I need a new rpm package NVIDIA_kernel-N.27...? Is that all?

I'll need to reinstall my soundcard, my DV display adaptor, and my printer. The soundcard and DV were autodetected from day 1, by the CD. Is it impossible to have them autodetected again?

Why do I need "sources" for the new kernel, if I have the new kernel already? I thought sources were only for rewriting code, which I won't be doing!

Is a module not the same thing as a driver?
hughesjr
The kernel source is also required to compile any kernel modules (that is, device drivers).

Do:

rpm -e kernel-N.13.mdk-1-1mdk kernel-N.17.mdk-1-1mdk

If you also have kernel-2.4.21.0.27mdk-1-1mdk

Yes, you need to install the NVIDIA for the current kernel to get X back...

All your previously detected stuff should still be detected.
jeff_brown
Problems
I'm sorry, I can't find the NVIDIA driver. Either I'm looking in the wrong places, or I'm looking for the wrong thing.

I've been searching for anything that starts with "NVIDIA_kernel-2.4.21.0.27mdk". Are there other titles that would work too?

I looked on rpmfind and on some ftp sites. The ftps had nothing for NVIDIA. rpmfind had NVIDIA drivers, but none for Mandrake, let alone with an appropriate version number. NVidia's site has drivers, but the only "NVIDIA_kernel" drivers they have are for version 1.x, last updated in September of 2001!

I'm feeling discouraged. I'm glad you're helping.


Error
I reported that I had the following installed:
kernel-N.13.mdk-1-1mdk
kernel-N.17*.mdk-1-1mdk
kernel-source-N.27.mdk
NVIDIA_kernel-N.13mdk-4321-3mdk

I made a typo: the .17 was supposed to be a .27. So I'm assuming that would change your advice from:

[QUOTE]
Do:
rpm -e kernel-N.13.mdk-1-1mdk kernel-N.17.mdk-1-1mdk
if you also have kernel-2.4.21.0.27mdk-1-1mdk
[UNQUOTE]

to:
[HYPOTHETICAL QUOTE]
Do
rpm -e kernel-N.13.mdk-1-1mdk
[END HYPOTHETICAL QUOTE]

If that's the case: Why would I want to erase the .13 package? What if I try a bunch of stuff in .27 and nothing works, but I kept .13 -- can I return to .13 somehow?
jeff_brown
[... continued remarks ...
recall, I was hoping to find
NVIDIA_kernel-2.4.21.0.27mdk.something]

I did find something close:
NVIDIA_kernel-2.4.21.0.25.2tex-4496.i586.rpm, for Mandrake.

Should I try installing that, or would I be risking certain death?
jeff_brown
I gave up and reinstalled Mandrake 9.1. If you want, of course, you can still answer any of the questions above, but I don't have an immediate need to know anymore.
hughesjr
Jeff,

sorry I didn't get back to you sooner. I have been working many more hours on a project at work and haven't had as much time on the forums as I would like in the last couple weeks....darn those bosses mad.gif Good news is, I get overtime smile.gif ... bad news is, I have a wife to spend it all laugh.gif
------------------------------------------------------
The reason to remove the older kernel (when everything works) is because it has security holes ... which is why they upgraded it in the frst place.
------------------------------------------------------
If you can't find an NVIDIA driver for your kernel, you can build one from the latest source from the NVIDIA website.

You would first prepare the kernel source (which has to match your kernel version).

cd /usr/src

do

ls -al

the linux link should point to the correct kernel source ... if it doesn't, do this:

rm -rf linux
ln -s /linux-xxxxxxx linux

(where xxxxx is the kernel version you have)

cd linux-xxxxxxx
(where xxxxx is the kernel version you have)

edit the Makefile and remove the custom from the EXTRAVERSION= line ... so that it matches your current kernel version exactly.

make mrproper

copy the /boot/config file that matches your kernel down to this directory (you should still be in /usr/src/linux-xxxxxxx) with this command:

cp config-xxxxxxx .config
(xxxxxxx is your kernel version)

make dep

kernel source is now prepared to make any required kernel modules
-------------------------------------
Now you can download the latest nvidia drivers from the nvidia site ... currently here:
http://www.nvidia.com/object/linux_display...2_1.0-5336.html

and the file is NVIDIA-Linux-x86-1.0-5336-pkg1.run

after downloading the file (download as root and save it in the /root directory), first make the file executable like this:

cd /root
chmod 755 NVIDIA-Linux-x86-1.0-5336-pkg1.run


now go to the console .... with this command (you will no longer have any GUI ... so print this first)

init 3

Log in as root and install the drivers like this:

IGNORE_CC_MISMATCH=YES ./NVIDIA-Linux-x86-1.0-5336-pkg1.run

after the drivers are installed, edit the file /etc/X11/XF86Config-4 (or XF86Config if XF86Config-4 doesn't exist) and change the display line from:

Display "nv"

to

Display "nvidia"

and also inside the XF86Config-4 (or XF86Config) file, remark out either of these with a # if they exist:

#Load dri
#Load "GLcore"


After saving the XF86Config(-4) file you should be able to startx with the nvidia drivers installed.

You will have to reinstall the Nvidia (or any other non standard kernel drivers) if you upgrade to a new kernel.
hughesjr
And for kernel modules (which the Nvidia drive is), they have to match the kernel version exactly...so a version that doesn't exactly match won't work.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.