How to Create, Install, and Uninstall deb Packages in Debian Linux

  Рет қаралды 335

Arashtad

Arashtad

Күн бұрын

In this video we discuss the way we can create, install, and uninstall .deb packages in Debian Linux.
1. Create a Directory for Your Project:
mkdir hello-world
cd hello-world
2. Write the C++ Program (main.cpp)
3. Compile the Program:
g++ main.cpp -o hello-world
4. Create the Directory Structure for the .deb Package:
mkdir -p hello-world-1.0/usr/local/bin
mkdir -p hello-world-1.0/DEBIAN
5. Move the executable:
mv hello-world hello-world-1.0/usr/local/bin/
6. Create the control file:
vim hello-world-1.0/DEBIAN/control
7. Add the following content to the control file:
Package: hello-world
Version: 1.0
Section: base
Priority: optional
Architecture: amd64
Maintainer: Your Name your.email@example.com
Description: A simple Hello World program
This is a simple Hello World program written in C++.
8. Set the necessary permissions:
chmod 755 hello-world-1.0/DEBIAN
chmod 755 hello-world-1.0/usr
chmod 755 hello-world-1.0/usr/local
chmod 755 hello-world-1.0/usr/local/bin
chmod 755 hello-world-1.0/usr/local/bin/hello-world
9. Build the package:
dpkg-deb --build hello-world-1.0
10. Install the package:
sudo dpkg -i hello-world-1.0.deb
11. Run the program to test:
hello-world
12. Uninstall the Package:
sudo dpkg -r hello-world
or:
sudo apt remove hello-world
13. Remove Configuration Files (if any):
sudo dpkg --purge hello-world
or:
sudo apt purge hello-world
14. Clean Up Unused Dependencies:
sudo apt autoremove
15. Verify Uninstallation:
which hello-world
All Open Source!
Arashtad provides high quality tutorials, eBooks, articles and documents, design and development services, over 400 free online tools, frameworks, CMS, WordPress plugins, Joomla extensions, and other products.
More Courses ▶ tuts.arashtad....
Business Inquiries ▶ arashtad.com/b...
Affiliate Programs ▶ arashtad.com/a...
eBooks ▶ press.arashtad...
Our Products ▶ market.arashta...
Our Services ▶ arashtad.com/s...
Our Portfolio ▶ demo.arashtad....
Free Online Tools ▶ tools.arashtad...
Our Blog ▶ blog.arashtad....
Documents ▶ doc.arashtad.com/
Licensing ▶ arashtad.com/l...
About us ▶ arashtad.com/a...
Join Arashtad Network ▶ i.arashtad.com/
Our Social Profiles ▶ arashtad.com/a...
Vimeo ▶ vimeo.com/aras...
Udemy ▶ www.udemy.com/...
GitHub ▶ github.com/ara...
Linkedin ▶ / arashtad
Twitter ▶ / arashtad

Пікірлер
How to Create .deb Packages for Debian, Ubuntu and Linux Mint
27:21
Joe Collins (EzeeLinux)
Рет қаралды 68 М.
Spongebob ate Michael Jackson 😱 #meme #spongebob #gmod
00:14
Mr. LoLo
Рет қаралды 11 МЛН
Un coup venu de l’espace 😂😂😂
00:19
Nicocapone
Рет қаралды 4,6 МЛН
Do you choose Inside Out 2 or The Amazing World of Gumball? 🤔
00:19
How To Get Married:   #short
00:22
Jin and Hattie
Рет қаралды 27 МЛН
DirectX12 はじめます
27:03
Coding Ocean
Рет қаралды 265
Why Are Open Source Alternatives So Bad?
13:06
Eric Murphy
Рет қаралды 646 М.
My most informative video yet! Let's build ourselves a Linux!
30:40
Is Linux A Bad Brand?
13:20
WitheredTechnology
Рет қаралды 4 М.
Become a shell wizard in ~12 mins
12:25
CODE IS EVERYTHING
Рет қаралды 251 М.
Linux Package Management | Debian, Fedora, and Arch Linux
19:16
Akamai Developer
Рет қаралды 21 М.
Nix explained from the ground up
23:39
Surma
Рет қаралды 37 М.
How to a build debian package
16:34
Daniel Persson (Kalaspuffar)
Рет қаралды 19 М.
The Making of Linux: The World's First Open-Source Operating System
11:33
ForrestKnight
Рет қаралды 1,2 МЛН
Spongebob ate Michael Jackson 😱 #meme #spongebob #gmod
00:14
Mr. LoLo
Рет қаралды 11 МЛН