我使用的是 Ubuntu 22.04.3 LTS。我制作了一个名为 的文件helloworld.deb,其源文件结构如下:
helloworld\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 DEBIAN\n\xe2\x94\x82 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 control\n\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 usr\n \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 games\n \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 mygame.sh\nRun Code Online (Sandbox Code Playgroud)\n我曾经dpkg-deb --build helloworld制作过helloworld.deb文件。然后我把sudo dpkg --instdir=phonyRoot -i helloworld.deb它安装在一个名为 的文件夹中phonyRoot。
我执行tree phonyRoot并得到以下结果:
phonyRoot\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 usr\n\xe2\x94\x82 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 games\n\xe2\x94\x82 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 mygame.sh\n\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 var\n \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 lib\n \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 dpkg\n \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 info\n \xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 format\n \xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 helloworld.list\n \xe2\x94\x82 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 helloworld.md5sums\n \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 lock\n \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 lock-frontend\n \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 status\n \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 status-old\n \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 triggers\n \xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 Lock\n \xe2\x94\x82 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 Unincorp\n \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 updates\n\n8 …Run Code Online (Sandbox Code Playgroud) package-management command-line dpkg debian software-installation