您的位置:首页 >数码 >

怎么从系统包里导出软件(导出软件的方法)

时间:2023-08-26 09:21:15 来源:互联网

在某些情况下,我们需要从系统包中导出某个软件。那么,具体要怎么做呢?

1.查找软件所在的包名

在终端中输入以下命令:

dpkg-S软件名称

然后会出现软件所在的包名,例如:

gnome-calculator:/usr/share/applications/gnome-calculator.desktop

2.查看软件安装路径

在终端中输入以下命令:

dpkg-L包名

然后会列出安装路径,例如:

/usr/bin/gnome-calculator

/usr/share/applications/gnome-calculator.desktop

/usr/share/gnome/help/gnome-calculator

/usr/share/gnome/help/gnome-calculator/legal.xml

/usr/share/gnome/help/gnome-calculator/c/gnome-calculator.xml

/usr/share/gnome/help/gnome-calculator/c/legal.xml

/usr/share/locale/am/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/ar/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/as/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/ast/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/be/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/bg/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/bn/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/bn_IN/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/bs/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/ca/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/ca@valencia/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/cs/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/cy/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/da/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/de/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/dz/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/el/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/en_AU/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/en_CA/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/en_GB/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/en_NZ/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/en_ZA/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/eo/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/es/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/et/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/eu/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/fa/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/fi/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/fr/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/fr_CA/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/fur/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/ga/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/gl/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/gu/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/he/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/hi/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/hr/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/hu/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/hy/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/id/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/is/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/it/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/ja/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/kk/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/km/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/kn/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/ko/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/ku/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/lt/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/lv/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/mai/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/mk/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/ml/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/mn/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/mr/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/ms/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/nb/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/ne/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/nl/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/nn/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/oc/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/or/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/pa/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/pl/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/pt/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/pt_BR/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/ro/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/ru/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/rw/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/se/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/si/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/sk/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/sl/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/sq/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/sr/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/sr@latin/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/sv/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/ta/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/te/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/tg/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/th/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/tr/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/ug/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/uk/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/ur/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/uz/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/vi/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/wa/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/xh/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/zh_CN/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/zh_HK/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/zh_TW/LC_MESSAGES/gnome-calculator.mo

/usr/share/locale/zu/LC_MESSAGES/gnome-calculator.mo

/usr/share/mime/packages/gnome-calculator.xml

/usr/share/mime/application/x-gnome-calculator.desktop

/usr/share/polkit-1/actions/org.gnome.calculator.policy

/usr/share/polkit-1/actions/org.gnome.calculator.user.policy

/usr/share/sounds/gnome/default/alerts/click.oga

/usr/share/sounds/gnome/default/alerts/glass.ogg

/usr/share/sounds/gnome/default/alerts/message.ogg

/usr/share/sounds/gnome/default/alerts/synth-hit.ogg

/usr/share/sounds/gnome/default/alerts/wood.ogg

/usr/share/alsa/cards/HDA-Intel.conf

/usr/share/alsa/cards/USB-Audio.conf

/usr/share/appdata/gnome-calculator.appdata.xml

/usr/share/gnome/help/gnome-calculator/legal.xml

/usr/share/icons/hicolor/16x16/apps/gnome-calculator.png

/usr/share/icons/hicolor/22x22/apps/gnome-calculator.png

/usr/share/icons/hicolor/24x24/apps/gnome-calculator.png

/usr/share/icons/hicolor/32x32/apps/gnome-calculator.png

/usr/share/icons/hicolor/48x48/apps/gnome-calculator.png

/usr/share/icons/hicolor/symbolic/apps/gnome-calculator-symbolic.svg

/usr/share/man/man1/gnome-calculator.1.gz

/usr/share/metainfo/gnome-calculator.appdata.xml

/usr/share/mysql-workbench/pixmaps/gnome-calculator.svg

/usr/share/polkit-1/actions/org.gnome.eog.policy

/usr/share/polkit-1/actions/org.gnome.eog.user.policy

/usr/share/polkit-1/actions/org.gnome.gthumb.policy

/usr/share/polkit-1/actions/org.gnome.gthumb.user.policy

/usr/share/polkit-1/actions/org.gnome.nautilus.policy

/usr/share/polkit-1/actions/org.gnome.nautilus.user.policy

/usr/share/polkit-1/actions/org.gnome.shell.policy

/usr/share/polkit-1/actions/org.gnome.shell.user.policy

/usr/share/polkit-1/actions/org.gnome.software.policy

/usr/share/polkit-1/actions/org.gnome.software.user.policy

/usr/share/polkit-1/actions/org.gnome.system-monitor.policy

/usr/share/polkit-1/actions/org.gnome.system-monitor.user.policy

/usr/share/polkit-1/actions/org.gnome.terminal.policy

/usr/share/polkit-1/actions/org.gnome.terminal.user.policy

/usr/share/polkit-1/com.redhat.rpm.install-db.pkla

/usr/share/polkit-1/com.redhat.rpm.rpmorg.pkla

/usr/share/polkit-1/scripts/xorg-x11-drv-catalyst

/usr/share/polkit-1/rules.d/com.redhat.rules.json

/usr/share/polkit-1/rules.d/com.redhat.system.fcoemonitor.rules

/usr/share/polkit-1/rules.d/com.redhat.system.semanage.rules

/usr/share/polkit-1/rules.d/org.freedesktop.ModemManager1.rules

/usr/share/polkit-1/rules.d/org.freedesktop.NetworkManager.rules

/usr/share/polkit-1/rules.d/org.freedesktop.color-manager.policy

/usr/share/polkit-1/rules.d/org.freedesktop.color-manager.rules

/usr/share/polkit-1/rules.d/org.freedesktop.udisks2.policy

/usr/share/polkit-1/rules.d/org.gnome.pkexec.adduser.rules

/usr/share/polkit-1/rules.d/org.gnome.pkexec.change-aduser-password.rules

/usr/share/polkit-1/rules.d/org.gnome.pkexec.change-aduser-until-password-expires.rules

/usr/share/polkit-1/rules.d/org.gnome.pkexec.change-user-password.rules

/usr/share/polkit-1/rules.d/org.gnome.pkexec.change-user-until-password-expires.rules

/usr/share/polkit-1/rules.d/org.gnome.pkexec.chpasswd.rules

/usr/share/polkit-1/rules.d/org.gnome.pkexec.debug-database.rules

/usr/share/polkit-1/rules.d/org.gnome.pkexec.debug-tcpdump.rules

/usr/share/polkit-1/rules.d/org.gnome.pkexec.debug-wireshark.rules

/usr/share/polkit-1/rules.d/org.gnome.pkexec.grip.rules

/usr/share/polkit-1/rules.d/org.gnome.pkexec.hardinfo.rules

/usr/share/polkit-1/rules.d/org.gnome.pkexec.hplip.rules

/usr/share/polkit-1/rules.d/org.gnome.pkexec.htop.rules

/usr/share/polkit-1/rules.d/org.gnome.pkexec.libvirt-guests.rules

/usr/share/polkit-1/rules.d/org.gnome.pkexec.libvirt-qemu.rules

/usr/share/polkit-1/rules.d/org.gnome.pkexec.libvirt.revertexecution.snapshot.rules

/usr/share/polkit-1/rules.d/org.gnome.pkexec.network-admin.tools.rules

/usr/share/polkit-1/rules.d/org.gnome.pkexec.nm-connection-editor.rules

/usr/share/polkit-1/rules.d/org.gnome.pkexec.phoronix-test-suite.rules

/usr/share/polkit-1/rules.d/org.gnome.pkexec.rhci-helper.rules

/usr/share/polkit-1/rules.d/org.gnome.pkexec.terminatorx.rules

/usr/share/polkit-1/rules.d/org.gnome.pkexec.thermald.rules

/usr/share/polkit-1/rules.d/org.gnome.pkexec.traceroute.rules

/usr/share/polkit-1/rules.d/org.gnome.pkexec.tweak-tool.rules

/usr/share/polkit-1/rules.d/org.gnome.pkexec.xtrlock.rules

/usr/share/polkit-1/rules.d/org.gnome.software.policy

/usr/share/polkit-1/rules.d/org.gnome.system-monitor.policy

/usr/share/polkit-1/rules.d/org.gnome.terminal.policy

/usr/share/servernanny/install.py

/usr/share/servernanny/servernanny.conf.example

/usr/share/applications/servernanny.desktop

/usr/share/pixmaps/servernanny.png

/usr/share/cairo-dock/plugins/applets/alarm_clock/langs/gnome-calculator.mo

/var/lib/dpkg/info/gnome-calculator.list

/var/lib/dpkg/info/gnome-calculator.md5sums

/var/lib/dpkg/info/gnome-calculator.postinst

/var/lib/dpkg/info/gnome-calculator.postrm

/usr/share/doc/gnome-calculator/changelog.Debian.gz

/usr/share/doc/gnome-calculator/copyright

3.将软件打包

在终端中输入以下命令:

dpkg-L包名|grep“\/bin\/”|xargs-I"{}"echo"{}>/路径/软件名"

然后将/路径/软件名替换成你要导出软件的路径和软件名即可,例如:

dpkg-Lgnome-calculator|grep"\/bin\/"|xargs-I"{}"echo"{}>/home/gnome-calculator"

4.导出软件的依赖包

在终端中输入以下命令:

apt-get--print-uris--yes--reinstallinstall软件名称|cut-d"""-f2|wget-i-

然后会下载软件的依赖包,例如:

apt-get--print-uris--yes--reinstallinstallgnome-calculator|cut-d"""-f2|wget-i-

5.将软件和依赖打包

在终端中输入以下命令:

dpkg-L包名|grep"\/bin\/"|xargstarcvf/路径/软件名.tar

然后将/路径/软件名.tar替换成你要导出软件和依赖的路径和软件名即可,例如:

dpkg-Lgnome-calculator|grep"\/bin\/"|xargstarcvf/home/gnome-calculator.tar

6.解压软件和依赖包

在终端中输入以下命令:

mkdir-p/路径/软件名&&tarxvf/路径/软件名.tar-C/路径/软件名

然后将/路径/软件名和/路径/软件名.tar替换成你要导入软件和依赖的路径和软件名即可,例如:

mkdir-p/home/gnome-calculator&&tarxvf/home/gnome-calculator.tar-C/home/gnome-calculator

通过以上步骤,我们就能够轻松地从系统包里导出软件了。

本文介绍了从系统包里导出软件的方法,其中包括查找软件所在的包名、查看软件安装路径、将软件打包、导出软件的依赖包、将软件和依赖打包以及解压软件和依赖包等方法。希望对大家有所帮助。


郑重声明:文章仅代表原作者观点,不代表本站立场;如有侵权、违规,可直接反馈本站,我们将会作修改或删除处理。