Changes

Jump to: navigation, search

Orange Pi 5 Plus

571 bytes added, 20:15, 6 June 2023
Debian Bullseye system
<ol style="list-style-type: lower-alpha;">
<li><p>The version of the gcc is shown below</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''gcc --version'''</p>
<p>gcc (Debian 10.2.1-6) 10.2.1 20210110</p>
<p>Copyright (C) 2020 Free Software Foundation, Inc.</p>
<p>This is free software; see the source for copying conditions. There is NO</p>
<p>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p>|}</li>
<li><p>'''hello_world.c''' program to write c language</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''vim hello_world.c'''</p>
<p>#include &lt;stdio.h&gt;</p>
 
 
<p>int main(void)</p>
<p>{</p>
:<p>printf(&quot;Hello World!\n&quot;);</p>:<p>return 0;</p><p>}</p>|}</li>
<li><p>Then compile and run '''hello_world.c'''</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''gcc -o hello_world hello_world.c'''</p>
<p>orangepi@orangepi:~$ '''./hello_world'''</p>
<p>Hello World!</p>|}</li></ol>
</li>
<li><p>Debian Bullseye Default with Python3</p>
<ol style="list-style-type: lower-alpha;">
<li><p>The specific version of Python is shown below</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''python3'''</p>
<p>'''Python 3.9.2''' (default, Feb 28 2021, 17:03:44)</p>
<p>Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.</p>
<p>&gt;&gt;&gt;</p>
|}{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''Use CTRL+D shortcut key to exit Python's interactive mode。'''</p></big>|}</li>
<li><p>'''hello_world.py''' program in Python language</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''vim hello_world.py'''</p>
<p>print('Hello World!')</p>|}</li>
<li><p>The results of running '''hello_world.py''' are shown below</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''python3 hello_world.py'''</p>
<p>Hello World!</p>|}</li></ol>
</li>
<li><p>Debian Bullseye's compilation tool and operating environment without Java default</p>
<ol style="list-style-type: lower-alpha;">
<li><p>You can use the following command to install openjdk. The latest &gt; version in Debian Bullseye is openjdk-17</p>
{| class="wikitable" style="width:800px;" |-|<p>orangepi@orangepi:~$ '''sudo apt install -y openjdk-17-jdk'''</p>|}</li>
<li><p>After installation, you can check the version of Java</p>
{| class="wikitable" style="width:800px;" |-|<p>orangepi@orangepi:~$ '''java --version'''</p>|}</li>
<li><p>Edit the '''hello_world.java''' of Java version</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''vim hello_world.java'''</p>
<p>public class hello_world</p>
<p>{</p>
::<p>public static void main(String[] args)</p>::<p>{</p>::::<p>System.out.println(&quot;Hello World!&quot;);</p>::<p>}</p>
<p>}</p>
<p>|}</p></li>
<li><p>Then compile and run '''hello_world.java'''</p>
<p>orangepi@orangepi:~$ '''javac hello_world.java'''</p>
<span id="ubuntu-focal-system"></span>
 
=== Ubuntu Focal system ===

Navigation menu