Changes

Jump to: navigation, search

Orange Pi 3B

527 bytes added, 16:30, 11 August 2023
Ubuntu Focal system
<li><p>Ubuntu Focal has the GCC compilation tool chain by default, which can compile the C language program directly in the Linux system of the development board.</p>
<ol style="list-style-type: lower-alpha;">
<li>The version of the gcc is shown below</li></ol></li></ol>{| class="wikitable" style="width:800px;" |-|
orangepi@orangepi:~$ '''gcc --version'''
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|}</ol>
<ol start="2" style="list-style-type: lower-alpha;">
<li>'''hello_world.c''' program to write C language</li></ol>{| class="wikitable" style="width:800px;" |-| orangepi@orangepi:~$ '''vim hello_world.c'''
orangepi@orangepi:~$ '''vim hello_world<p>#include &lt;stdio.c'''h&gt;</p>
#include &lt;stdio.h&gt;
int main(void)
{
:printf(&quot;Hello World!\n&quot;); 
:return 0;
}
|}</ol>
<ol start="3" style="list-style-type: lower-alpha;">
<li>Then compile and run '''hello_world.c'''</li></ol>{| class="wikitable" style="width:800px;" |-|
orangepi@orangepi:~$ '''gcc -o hello_world hello_world.c'''
Hello World!
|}</ol></li></ol>
<ol start="2" style="list-style-type: decimal;">
<li><p>Ubuntu Focal defaults to install Python3</p>
<ol style="list-style-type: lower-alpha;">
<li>Python3 specific version is shown below</li></ol></li></ol>{| class="wikitable" style="width:800px;" |-|
orangepi@orangepi:~$ '''python3'''
&gt;&gt;&gt;
|}</ol>
<ol start="2" style="list-style-type: lower-alpha;">
<li>'''hello_world.py''' program in Python language</li></ol>{| class="wikitable" style="width:800px;" |-|
orangepi@orangepi:~$ '''vim hello_world.py'''
print('Hello World!')
|}</ol>
<ol start="3" style="list-style-type: lower-alpha;">
<li>The results of running '''hello_world.py''' are shown below</li></ol>{| class="wikitable" style="width:800px;" |-|
orangepi@orangepi:~$ '''python3 hello_world.py'''
Hello World!
|}</ol></li></ol>
<ol start="3" style="list-style-type: decimal;">
<li><p>Ubuntu Focal's compilation tool and operating environment without the installation of Java default</p>
<ol style="list-style-type: lower-alpha;">
<li>You can use the following command to install '''openjdk-17'''</li></ol></li></ol>{| class="wikitable" style="width:800px;" |-|
orangepi@orangepi:~$ '''sudo apt install -y openjdk-17-jdk'''
|}</ol>
<ol start="2" style="list-style-type: lower-alpha;">
<li>After installation, you can check the version of Java</li></ol>{| class="wikitable" style="width:800px;" |-|
orangepi@orangepi:~$ '''java --version'''
OpenJDK 64-Bit Server VM (build 17.0.2+8-Ubuntu-120.04, mixed mode, sharing)
|}</ol>
<ol start="3" style="list-style-type: lower-alpha;">
<li>Edit the '''hello_world.java''' of Jave version</li></ol>{| class="wikitable" style="width:800px;" |-|
orangepi@orangepi:~$ '''vim hello_world.java'''
{
:public static void main(String[] args)
:{
::System.out.println(&quot;Hello World!&quot;);
:}
}
|}</ol>
<ol start="4" style="list-style-type: lower-alpha;">
<li>Then compile and run '''hello_world.java'''</li></ol>{| class="wikitable" style="width:800px;" |-|
orangepi@orangepi:~$ '''javac hello_world.java'''
Hello World!
|}
</ol>
</li></ol>
<span id="ubuntu-jammy-system"></span>
<span id="ubuntu-jammy-system"></span>
=== Ubuntu jammy system ===

Navigation menu