LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Java and C problems on DSL (https://www.linuxquestions.org/questions/linux-newbie-8/java-and-c-problems-on-dsl-135155/)

stupidclese 01-15-2004 02:00 PM

Java and C problems on DSL
 
I performed a Damn Small Linux hard disk installation on my old Pentium 2 recently only to find out that they left out all of the c libraries and java was not installed either. GCC is present but it doesn't even recognize the <stdio.h> library.
Since Java wasn't present I downloaded it off of sun's website and installed it, but I can't compile or run a program unless my current directory is /root/home/j2sdk/bin or whatever.
How do I change my settings so I can compile java at any time, and where can I get the C libraries I need.

itsme86 01-15-2004 02:13 PM

You need to add /root/home/j2sdk/bin to your PATH. Check out /etc/profile.

The C library package is called glibc and can be obtained from gnu.org (ftp://ftp.gnu.org/gnu/glibc).

stupidclese 01-15-2004 02:25 PM

only as root
 
How do I change the permission so I can run java and javac without being logging in as root? chmod?

Tinkster 01-15-2004 03:01 PM

Really, you should move java to
/usr
and then chmod the whole directory ...

And put something like
Code:

#!/bin/sh
# Add JDK1.3 specific settings
export JAVA_HOME=/usr/java
export PATH=$PATH:/usr/java/bin:/usr/java/jre/bin

into
/etc/profile.d/java.sh
and make it
chmod ugo+x,go-w /etc/profile.d/java.sh


As for the C-stuff ... did you try to
locate stdio\.h
or
find / -name stdio.h
? Maybe you're just missing the paths ...


Cheers,
Tink

willand 01-15-2004 03:03 PM

i don't know.. if it is so easy.. to change the permission of an executable of the /bin directory (for example).. and that an another user can uses applications..
because after the executable, there is so others programs, modules...
no ?

and if the others depedances doesn't have permissions... you can't lauch correctly the program even if you have the permissions on the main program...

stupidclese 01-15-2004 03:46 PM

dont have gcc
 
I found out that I don't even have gcc at all, I have tcc which came with damn small linux. I need to download gcc so I can install open office and glibc. Does anybody know where I can aquire a copy of gcc?

Tinkster 01-15-2004 05:07 PM

From what I gathered from the Damn Small
Linux homepage you should be able to get
the dpkg and then it should be a breeze to
apt-get it :)



Cheers,
Tink

willand 01-16-2004 05:14 AM

You can download gcc on : http://gcc.gnu.org/

stupidclese 01-16-2004 12:29 PM

additional problems
 
I tried to install gcc, and the instructions told me to run the configure command and when I did it only did half of its job. It created "MakeFile" in /home/root/gccBuild using "mt-frag" but for the rest it keeps trying to use my old tcc comiler (which I'm trying to replace with gcc as we speak because tcc blows). It then continues to print "*** You must set the environment variable CC to a working comiler." What I don't understand is how does this installation even work at all if you don't have a compiler to begin with? Is there some text file that sets "cc" as a command exclusively associated with tcc that I have to change before the configuration process with complete?

stupidclese 01-17-2004 11:50 AM

help me
 
Hey, somebody help me, I need my computer working and I don't know how to fix it. See above post.


All times are GMT -5. The time now is 01:27 AM.