LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 01-11-2008, 10:22 PM   #1
Virtuality
Member
 
Registered: Jan 2007
Distribution: Debian Etch
Posts: 193

Rep: Reputation: 30
telling glibc to use gawk instead of mawk


As the topic says; my compiler is trying to use mawk but I want to use gawk, I have gawk and mawk installed.
 
Old 01-11-2008, 10:34 PM   #2
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 60
Does this ring a bell?
[ted@toshiba64 ted]$ ls -l `which awk`
lrwxrwxrwx 1 root root 4 Nov 15 13:17 /bin/awk -> gawk


What does it have to do with glibc?
 
Old 01-11-2008, 11:08 PM   #3
Virtuality
Member
 
Registered: Jan 2007
Distribution: Debian Etch
Posts: 193

Original Poster
Rep: Reputation: 30
# ls -l `which awk`
# lrwxrwxrwx 1 root root 21 2007-12-17 06:09 /usr/bin/awk -> /etc/alternatives/awk

Not sure what to do with that... :/

I'm trying to compile glibc 2.7 but it tries to use mawk instead of gawk, and it causes errors
 
Old 01-11-2008, 11:20 PM   #4
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 60
Well, what does /etc/alternatives/awk point to? I bet it's /bit/mawk Check with
ls -l /etc/alternatives/awk
If you want it to point to /bin/gawk just change that symlink.
http://www.debian-administration.org/articles/91
Something like
update-alternatives set awk /bin/gawk
or /bin/squeak or whatever you want it to be. Sorry, your thread title looks somewhat funny to me...

Last edited by Uncle_Theodore; 01-11-2008 at 11:25 PM.
 
Old 01-12-2008, 02:55 AM   #5
Virtuality
Member
 
Registered: Jan 2007
Distribution: Debian Etch
Posts: 193

Original Poster
Rep: Reputation: 30
I did 'update-alternatives --set awk /usr/bin/gawk'

And it's still trying to use mawk.

That's where it is installed on my system:
'update-alternatives: Cannot find alternative `/bin/gawk'.'

Code:
# ls -l /etc/alternatives/awk
lrwxrwxrwx 1 root root 13 2008-01-12 21:45 /etc/alternatives/awk -> /usr/bin/gawk

Last edited by Virtuality; 01-12-2008 at 03:06 AM.
 
Old 01-12-2008, 12:22 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,972
Blog Entries: 11

Rep: Reputation: 876Reputation: 876Reputation: 876Reputation: 876Reputation: 876Reputation: 876Reputation: 876
you should probably install it then?

apt-get install gawk



Cheers,
Tink
 
Old 01-12-2008, 01:22 PM   #7
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 60
OK. So, gawk is installed in /usr/bin. Where is mawk installed? In /bin? Then, probably, since in your PATH variable /bin preceeds /usr/bin, the installer insists on using /bin/mawk. You might wanna create a symlink /bin/gawk to /usr/bin/gawk

BTW, it's not a good idea to install glibc from sources. You will most likely destroy your entire system.

Last edited by Uncle_Theodore; 01-12-2008 at 01:24 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
awk, mawk, gawk - which is "better"? jayeola Programming 8 12-18-2007 08:51 PM
mawk JurajPsycho Linux - Newbie 7 01-21-2005 05:03 AM
FS=? in gawk realos Programming 2 05-28-2003 07:30 PM
mawk prob in 4.0rc1 iceman47 Linux From Scratch 0 03-05-2003 03:56 PM
mawk and math notsoevil Linux From Scratch 1 02-10-2002 09:51 PM


All times are GMT -5. The time now is 07:29 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration