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.
I am new to Linux. I am trying to compile one software written by one of my collaborators.
I unzipped this software under Linux(Launch NX session for Windows, this Linux runs under Windows OS but I tried to do everything under Linux without using Windows OS) and tried the following:
bash-3.2$ ./configure && make
The following info appeared:
...
checking whether make sets $(MAKE)... (cached) yes checking for ranlib... (cached) ranlib checking whether make sets $(MAKE)... (cached) yes checking for exp in -lm... yes checking for prng_new in -lprng... no
configure: error: prng library not found
Then I tried to compile the C file with main() directly using:
bash-3.2$ g++ -o executable.exe mainProgram.c
The following info appeared:
mainProgram.c:14:18: error: prng.h: No such file or directory
mainProgram.c:15:19: error: tools.h: No such file or directory ...
So I doubt whether I need to install prng library. I tried to tar prng-3.0.2.tar.gz, and lpng142 which is developer version,. But the same error appeared.
My question is, is there aynthing wrong with the Linux configuration? Why the compiler can not recognize the prng library I downloaded?
I dont wanna ask my collaborator about this question cause I think that this question is kinda basic and I dont wanna leave him bad impression.
Why the compiler can not recognize the prng library I downloaded?
You didn't put it in the right place. You didn't mention what distribution you are running, but it probably has the prng libraries and headers available. Just install libsprng2-dev or whatever it's called.
I downloaded libsprng2-dev from http://sprng.cs.fsu.edu/, which is actually sprng library. But in my first message I got the info such as "configure: error: prng library not found". So this sprng library can not work. Sorry.
Before I wrote my first message , I downloaded already prng-3.0.2.tar.gz. I put the folder prng-3.0.2 in the same directory as configure file is. I ran :
bash-3.2$ ./configure && make
The same info appeared:
...
checking for prng_new in -lprng... no
configure: error: prng library not found
I redownloaded prng-3.0.2.tar.gz and tried the same command ./configure && make, but still, the same info appeared:
configure: error: prng library not found
I put the folder prng-3.0.2 in the same directory as the configure file. What command should I use to let the system know that prng library is already there?
or edit the path to wherever the prng library installs itself.
Or if the prng does not "make itself" then copy the directory into /usr/local/lib and do the same thing.
I've had a lot of troubles with linux not being able to find libraries in the past, and generally this has been the cause.
N.B. If this works it might be wise to edit the .bashrc of your account which should be in their home folder, putting in the LD_LIBRARY_PATH code as this will set the environment variable whenever you login.
Last edited by jackerybakery; 06-15-2010 at 04:39 PM.
and Linux can recognize these two commmands. but still, it can not find the h files.
I had to copy the the h files into the same directory as the C file and compile it.
and there is one error:
aaa.h:72: error: expected \u2018,\u2019 or \u2018...\u2019 before \u2018new\u2019
actually it should be : aaa.h:72: error: expected ',' or '...' before 'new'
I checked the line 72 of aaa.h:
int MoveNode(struct node_gra *node, struct group *old, struct group *new);
I can not find anything wrong!
what is the problem?
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
cd prng-3.0.2/ && make
su
make install
.. will provide the files in /usr/local/
.. Without that, there is no reason to point to
/usr/local/ with export LD_LIBRARY_PATH , etc.
..
As requested by AlucardZero, please tell us what linux distribution you are running. Once you provide that information it should be trivial to answer your question.
However you state "Launch NX session for Windows", so I wonder if you are really running linux at all: perhaps you are using cygwin?
You are right. I should write more details about the Linux environment I am using:
Someone helped me and used centos5-wrkstn-flat.vmdk to install a virtual machine for linux on my Windows NP OS.
I am using GNOME desktop ver 2.16.0, from distributor Red Hat Inc, build date 09/04/2006.
The user interface for Linux starts from Nomachine.
Hopefully this info is detailed enough.
THank you.
Tony
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
Post # 8
Quote:
Permission denied
... You will need a password to install to /usr//local.
The commands are 1) su
1a) Then enter your root password.
>> Entering a password in a terminal window is "invisible",
you won't see any types or dots, when you type.
2) <ENTER>
3) make install
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.