Ubuntu22/Local Repository
From r00tedvw.com wiki
(Difference between revisions)
Line 1: | Line 1: | ||
[[Ubuntu22/Local_Repository|Local Repository]] | [[Ubuntu22/Local_Repository|Local Repository]] | ||
+ | =Prerequisites= | ||
<nowiki>~$ sudo apt-get install -y gcc dpkg-dev gpg</nowiki> | <nowiki>~$ sudo apt-get install -y gcc dpkg-dev gpg</nowiki> | ||
+ | =Example app= | ||
+ | <nowiki>~$ mkdir -p ~/example/hello-world-program | ||
+ | ~$ echo '#include <stdio.h> | ||
+ | int main() { | ||
+ | printf("hello packaged world\n"); | ||
+ | return 0; | ||
+ | }' > ~/example/hello-world-program/hello.c | ||
+ | ~$ cd ~/example/hello-world-program | ||
+ | ~$ gcc -o hello-world hello.c</nowiki> |
Revision as of 10:30, 5 December 2022
Local Repository
Prerequisites
~$ sudo apt-get install -y gcc dpkg-dev gpg
Example app
~$ mkdir -p ~/example/hello-world-program ~$ echo '#include <stdio.h> int main() { printf("hello packaged world\n"); return 0; }' > ~/example/hello-world-program/hello.c ~$ cd ~/example/hello-world-program ~$ gcc -o hello-world hello.c