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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
What's the best way to add to the include library path in Ubuntu? I have tried to install a number of different packages and am constantly coming up with problems because packages such as Tk and gtk which are already installed are not being picked up by the library path.
Without seeing the actual errors you're receiving and where in the process you receive them (configure, build, or install) one can only guess what env var needs to be set. You are on *buntu, so the most likely cause of your problems is missing development packages for Gtk and Tk on your system. Install the Gtk and Tk development packages.
Gtk2 use a metadata file to assist the configuration of other programs, Gtk1 uses a config script. Don't know which one you're using because you don't provide sufficient information to troubleshoot your problem. The env var that needs to be set to pick up these respective files is different. If things aren't installed in non-standard locations, you shouldn't need to muck with env vars anyway.
The development packages for Tk and Gtk are installed. The errors are happening at the compile stage. For example, I'm trying to install Grass
GIS. Tk8.4 is already installed and the header library is in /usr/include. But the configure script keeps stopping with a message along the lines of 'unable to find tk.h'
OK, is it failing the build (compile stage) or the configure (configure script)? Generally one would post the last 20-30 lines of the failed build (if it really is the build that is failing), not just a paraphrase of the error message. The error message is important, but it's also important to know what the package was trying to do.
Here are the last twenty or so lines I get when I run the configure script. As mentioned before, tk.h and other tk files are installed and sitting in /usr/include. Nothing I do has worked to get the script to recognize the tk files, including to editing ld.so.conf.
checking whether to use JPEG... yes
checking for location of JPEG includes...
checking for jpeglib.h... yes
checking for location of JPEG library...
checking for jpeg_start_compress in -ljpeg... yes
checking whether to use GDAL... yes
checking for gdal-config... /usr/local/bin/gdal-config
checking for GDALOpen... yes
checking whether to use TIFF... yes
checking for location of TIFF includes...
checking for tiffio.h... yes
checking for location of TIFF library...
checking for TIFFOpen in -ltiff... yes
checking whether to use PNG... yes
checking for location of PNG includes...
checking for png.h... yes
checking for location of PNG library...
checking for png_read_image in -lpng... yes
checking whether to use Tcl/Tk... yes
checking for location of Tcl/Tk includes...
checking for tcl.h... yes
checking for tk.h... no
configure: error: *** Unable to locate Tk includes.
I had similar problems trying to compile wxWidgets. I was getting a similar message regarding Gtk+, which is installed under /usr/include. In that case I successfully got around it by compiling wxWidgets with
the x11 option.
Tk creates a shell script containing installation information that is used by other packages. The script is called tkConfig.sh. Mine are installed in /usr/lib and /usr/lib64. Sometimes a package needs to be told where to look for this script. Generally packages that do or may use Tcl or Tk have a configure option to point to the configure script. For example, the configure script for R needs to be passed --with-tk-config=/usr/lib/tkConfig.sh or it won't find the tk stuff. Take a look at the output of ./configure --help to see if there is a similar option for the package(s) you're trying to install.
The procedure above didn't fix the problem, however using the --help option on configure, which I hadn't been aware of before, has opened up several lines of enquiry. I think the problem is with the way Tcl Tk has been installed. The configure script is looking for a single TclTk directory whereas I have Tcl and Tk in two different directories because that's how they installed from the Ubuntu disk.
My plan at this stage is to uninstall Tcl Tk, get hold of the source code and work on the problem from that angle.
Two reasons - my home computer isn't attached to the internet, and I'm trying to install software from source in order to learn about Linux. Getting the actual package up and running is less important than expanding my knowledge base.