SlackwareThis Forum is for the discussion of Slackware Linux.
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.
I am trying to install amarok on Slackware from source, (tried the .tgz package with no luck). After compiling all the dependency. I am ready for configuring amarok. I just don,t know the proper way of using the --prefix in a ./configure command. Before i mess to much my installation i got to ask how to edit a --prefix line.
When an installation readme file says to (./configure --prefix=`kde-config --prefix`),what those it mean and how should i write that line.
I wrote this ./configure --prefix=/the_path_to_that_kde-config/ but with no luck...
I am sure that i am writing that --prefix line wrong.
You should run the ./configure script as it's given in the istallation readme, i.e.
Code:
/configure --prefix=`kde-config --prefix`
This way, assuming kde-config is in your PATH ( it should be), it will be executed with the "--prefix" which will give the path to your kde installation dir. It's the same as
It should've worked. Maybe you used "su root" before that, then kde-config would be outside the $PATH variable. You can use "su - root" (or just "su -") to avoid such things.
That won't make a difference. The reason why it didn't work is because he is running the kde-config command as root, and kde-config is not in his path by default when he is root, so he gets a command not found, so essentially he is using
./configure --prefix=
kde-config: command not found
as his prefix. The best option would be to type the prefix in ./configure as a standard user who has kde-config in his path, that way, when kde-config --prefix is run, you get the proper directory, in this case /opt/kde, and that /opt/kde goes in the place of the two "``".
But ultimately in this case
./configure --prefix=/opt/kde and
./configure --prefix=`kde-config --prefix` and
./configure --prefix=${kde-config --prefix)
All do the same thing, as long as the binary "kde-config" is in the path of the user that you are trying to execute the ./configure as.
Another possibility is that Davno did not see the backticks (the ``) around the command and used '' instead.
The expression `some_command` (i.e. using backticks) is an equivalent to running the command "some_command" and using it's return value in the surrounding commandline.
My old networking professor is a unix/linux guru and we had this little thing in class one day.
The:
Code:
`code`
syntax (backquote, backtick) is actually called a "grave" in unix language. It's pronounced graav.... with a long A, silent E.
He said the only reason why we were learning about it is so that we could recognize it when looking over older scripts. But that in current practice, we should use
Code:
$(code)
unless we're working on older machines that don't recognize the new syntax.
The main reason being that the grave (`) character itself is too hard to distinguish between the single quote (') and the mistaken syntax "could cause mass roits among confused people not knowing why a script isn't working." (A memorable line indeed... )
He also said that it "just makes more sense" now that
Code:
expr(expression)
can also be written as
Code:
$((expression))
Which makes sense because anything inside a $() represents a value to be determined.
The reason it was not working is that i was configuring as root so it was not in the PATH. I always tought that you untar as user and did the rest as root. Another question is: if i would have configure as a user, will the program work for other user on that machine ? As for the backtick, i knew about it, i copy and pasted it because i dont have that key on my keyboard Or its very well hidden.
The reason it was not working is that i was configuring as root so it was not in the PATH. I always tought that you untar as user and did the rest as root. Another question is: if i would have configure as a user, will the program work for other user on that machine ? As for the backtick, i knew about it, i copy and pasted it because i dont have that key on my keyboard Or its very well hidden.
I have a standard en_US keyboard, and my ` key is next to my 1, and if I hold shift + ` I get the ~.
Also, you should pretty much always untar the binary as user, then run ./configure and make as user, and then only run make install as root.
As long as you run make install as root, then it doesn't matter who configured it or built it, anybody can use it(unless it is a root only program that installs in /sbin)
Many linux users would GLADLY ignore easier to recognize syntax like $(...) just so that they can use something that's relatively unknown and 1337. FACT.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.