I'm trying to turn a simple python program into a debian package for Linux.
I created a folder /testhello
, and created testhello/DEBIAN
and testhello/usr
. Inside testhello/DEBIAN
i have a control file that contains:
Package: testhello
Version: 0.01
Architecture: all
Maintainer: Me,me@gmail.com
Installed-Size: 2
Depends: python3
Section: extras
Priority: optional
Homepage: your homepage
Description: describe
Inside testhello/usr
there's a bin
folder, that contains testhello.py
, a file that contains a single line, print("hello world")
I then successfully ran dpkg -b testhello
and then sudo dpkg -i testhello
.
But when i run the command testhello
in bash i am greeted with testhello: command not found
What can I do?
Edit 1: When i go to /bin i can see testhello.py there.
Check the shebang (first line):
#! /usr/bin/env python
print("hello world")
give execute permission and should work.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.