Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The tgrep commands not working in my terminal at the moment and I was told by someone the following.
"It's not a standard command. I suspect the source needs to be recompiled for the
current platform. Can you find the source files and compile them in your home dir?"
I can't get into touch with that someone at the moment so could anyone explain what exactly that means and how I get tgrep working.
I'd never heard of tgrep so I Googled it, and discovered several different tgrep: "Threaded grep," "Time grep," the "Telephony Gateway Registration Protocol," et al.
So, the first questions you need to answer, is "What tgrep are you interested in? For what goal are you hoping to use it? If we know the answers to those questions, we can, perhaps, offer some advice or assistance.
tgrep which is a version of grep (I think), which helps you to work with PennTreebank. I guess the main question is I have a command which isn't a standard linux command and I don't know how to "install" it. I'm not sure whether the term "install" is correct in this case because I'm trying to do what I was told which is stated in my earlier post. Explaining what that means to a linux beginner like me would be very helpful.
As far as I can see, tgrep2 is the version used by the U Penn people, That is distributed in source code only, not pre-compiled for you. (As you said your friend told.)
Uncompress the file into the ~/tgrep/ directory: tar -xgf tgrep.tar.gz
Change your working directory to that directory: cd tgrep/
Read the instructions: less README.LINUX
Create the tgrep command: ./INSTALL
That is a general outline because the specifics of how you do each of those steps will depend on the Linux distribution you're using. Note, however, that the install script assumes that you have the commands bison, flex, imake and gcc available on your system, and that you have the X11 application libraries available. (Re the X11 libraries, the script seems to be assuming the obsolete X11R86 libraries, so you may have a problem with graphical output.) The script is written in the csh script language, and you'll also need that installed before you can run it.
Last edited by PTrenholme; 03-06-2011 at 07:01 PM.
As far as I can see, tgrep2 is the version used by the U Penn people, That is distributed in source code only, not pre-compiled for you. (As you said your friend told.)
Uncompress the file into the ~/tgrep/ directory: tar -xgf tgrep.tar.gz
Change your working directory to that directory: cd tgrep/
Read the instructions: less README.LINUX
Create the tgrep command: ./INSTALL
That is a general outline because the specifics of how you do each of those steps will depend on the Linux distribution you're using. Note, however, that the install script assumes that you have the commands bison, flex, imake and gcc available on your system, and that you have the X11 application libraries available. (Re the X11 libraries, the script seems to be assuming the obsolete X11R86 libraries, so you may have a problem with graphical output.) The script is written in the csh script language, and you'll also need that installed before you can run it.
Very informative thanks. I've done what you told me but I get an error in the installation process. The following shows what I've done and what error I get.
Code:
denish@ubuntu:~/tgrep$ ./INSTALL
****************************************************************
THIS IS THE CONFIGURATION SCRIPT FOR TGREP
Please answer all questions with full pathnames
****************************************************************
I cannot determine the gcc include path on your system.
Please enter the gcc include path if it is available: /usr/include
/usr/src/linux/include was not found on your system.
Please enter a substitute include path if it is available: /usr/src/linux-headers-2.6.35-24-generic
/usr/X11R6/include was not found on your system.
Please enter a substitute include path if it is available:
/usr/X11R6/lib was not found on your system.
Please enter a substitute include path if it is available:
Warning: /Xm was not found. The X progress display will
not be available.
****************************************************************
The perl command is :: /usr/bin/perl
The bison command is :: /usr/bin/bison
The flex command is :: /usr/bin/flex
The imake command is :: /usr/bin/imake
gcc include path is :: /usr/include
linux include path is :: /usr/src/linux-headers-2.6.35-24-generic
standard include path :: /usr/include
standard library path :: /usr/lib
Are these parameters correct? [y/n/q] y
continuing with configuration
Enter the directory where you wish to install the tgrep executables:
[the default is /home/denish/tgrep/bin : return = default]
:
Enter the directory where you wish to install the tgrep corpora:
[the default is /home/denish/tgrep/data : return = default]
:
The tgrep man pages are for the first section of the manual.
Enter the directory where you wish to install
the tgrep man pages (i.e. /usr/local/man/man1):
[the default is /home/denish/tgrep/doc/man1 : return = default ]
:
****************************************************************
install executables in :: /home/denish/tgrep/bin
install corpora in :: /home/denish/tgrep/data
install man pages in :: /home/denish/tgrep/doc/man1
Are these parameters correct? [y/n/q] y
continuing with configuration
***** MAKING MAKEFILE IN DIRECTORY src/tools
***** MAKING MAKEFILE IN DIRECTORY src/environ
***** MAKING MAKEFILE IN DIRECTORY src/tgrep
***** MAKING MAKEFILE IN DIRECTORY bin
***** MAKING MAKEFILE IN DIRECTORY doc
***** MAKING MAKEFILE IN DIRECTORY data
***** MAKING MAKEFILE IN DIRECTORY /home/denish/tgrep/config
*********************************************************
THE CONFIGURATION STAGE OF THE BUILD PROCESS IS COMPLETE
If you experience trouble beyond this point you don't
need to run INSTALL again, you can just run 'make'
to make everything or 'make install' to make everything
and install everything.
If need be, you should run make from the directory /home/denish/tgrep
*********************************************************
***** MAKING AND INSTALLING FROM DIRECTORY src/tools
make[1]: Entering directory `/home/denish/tgrep/src/tools'
gcc -c -o ArgPack.o ArgPack.c -g -I/usr/include -I/usr/src/1-headers-2.6.35-24-generic -I -I/usr/include -I. -Dconst= -DMEMDEBUG=0 -Wall -m486 -O4
cdenish@ubuntu:~/tgrep$ ./INSTALL
****************************************************************
THIS IS THE CONFIGURATION SCRIPT FOR TGREP
Please answer all questions with full pathnames
****************************************************************
I cannot determine the gcc include path on your system.
Please enter the gcc include path if it is available: /usr/include
/usr/src/linux/include was not found on your system.
Please enter a substitute include path if it is available: /usr/src/linux-headers-2.6.35-24-generic
/usr/X11R6/include was not found on your system.
Please enter a substitute include path if it is available:
/usr/X11R6/lib was not found on your system.
Please enter a substitute include path if it is available:
Warning: /Xm was not found. The X progress display will
not be available.
****************************************************************
The perl command is :: /usr/bin/perl
The bison command is :: /usr/bin/bison
The flex command is :: /usr/bin/flex
The imake command is :: /usr/bin/imake
gcc include path is :: /usr/include
linux include path is :: /usr/src/linux-headers-2.6.35-24-generic
standard include path :: /usr/include
standard library path :: /usr/lib
Are these parameters correct? [y/n/q] y
continuing with configuration
Enter the directory where you wish to install the tgrep executables:
[the default is /home/denish/tgrep/bin : return = default]
:
Enter the directory where you wish to install the tgrep corpora:
[the default is /home/denish/tgrep/data : return = default]
:
The tgrep man pages are for the first section of the manual.
Enter the directory where you wish to install
the tgrep man pages (i.e. /usr/local/man/man1):
[the default is /home/denish/tgrep/doc/man1 : return = default ]
:
****************************************************************
install executables in :: /home/denish/tgrep/bin
install corpora in :: /home/denish/tgrep/data
install man pages in :: /home/denish/tgrep/doc/man1
Are these parameters correct? [y/n/q] y
continuing with configuration
***** MAKING MAKEFILE IN DIRECTORY src/tools
***** MAKING MAKEFILE IN DIRECTORY src/environ
***** MAKING MAKEFILE IN DIRECTORY src/tgrep
***** MAKING MAKEFILE IN DIRECTORY bin
***** MAKING MAKEFILE IN DIRECTORY doc
***** MAKING MAKEFILE IN DIRECTORY data
***** MAKING MAKEFILE IN DIRECTORY /home/denish/tgrep/config
*********************************************************
THE CONFIGURATION STAGE OF THE BUILD PROCESS IS COMPLETE
If you experience trouble beyond this point you don't
need to run INSTALL again, you can just run 'make'
to make everything or 'make install' to make everything
and install everything.
If need be, you should run make from the directory /home/denish/tgrep
*********************************************************
***** MAKING AND INSTALLING FROM DIRECTORY src/tools
make[1]: Entering directory `/home/denish/tgrep/src/tools'
gcc -c -o ArgPack.o ArgPack.c -g -I/usr/include -I/usr/src/1-headers-2.6.35-24-generic -I -I/usr/include -I. -Dconst= -DMEMDEBUG=0 -Wall -m486 -O4
cc1: error: unrecognized command line option "-m486"
make[1]: *** [ArgPack.o] Error 1
make[1]: Leaving directory `/home/denish/tgrep/src/tools'
exit: 1: Illegal number: -1
make: *** [install] Error 2
************************************************************
It seems that the build process did not go smoothly
If you cannot diagnos and fix the problem yourself
send email to tgrep-support@linc.cis.upenn.edu
containing a copy of all the output from this failed
installation process.
************************************************************
c1: error: unrecognized command line option "-m486"
make[1]: *** [ArgPack.o] Error 1
make[1]: Leaving directory `/home/denish/tgrep/src/tools'
exit: 1: Illegal number: -1
make: *** [install] Error 2
************************************************************
It seems that the build process did not go smoothly
If you cannot diagnos and fix the problem yourself
send email to tgrep-support@linc.cis.upenn.edu
containing a copy of all the output from this failed
installation process.
************************************************************
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.