Linux посмотреть содержимое пакета

How do I get a list of installed files from a package?

I want to know where I can find my installed application when I installed it on Ubuntu using package manager. I installed RabbitMQ and ran locate rabbitmq which gave me following result:

/home/anupamg/.m2/repository/com/rabbitmq /home/anupamg/.m2/repository/com/rabbitmq/amqp-client /home/anupamg/.m2/repository/com/rabbitmq/amqp-client/1.7.2 /home/anupamg/.m2/repository/com/rabbitmq/amqp-client/1.7.2/_maven.repositories /home/anupamg/.m2/repository/com/rabbitmq/amqp-client/1.7.2/amqp-client-1.7.2.jar /home/anupamg/.m2/repository/com/rabbitmq/amqp-client/1.7.2/amqp-client-1.7.2.jar.lastUpdated /home/anupamg/.m2/repository/com/rabbitmq/amqp-client/1.7.2/amqp-client-1.7.2.jar.sha1 /home/anupamg/.m2/repository/com/rabbitmq/amqp-client/1.7.2/amqp-client-1.7.2.pom /home/anupamg/.m2/repository/com/rabbitmq/amqp-client/1.7.2/amqp-client-1.7.2.pom.lastUpdated /home/anupamg/.m2/repository/com/rabbitmq/amqp-client/1.7.2/amqp-client-1.7.2.pom.sha1 /home/anupamg/Downloads/rabbitmq-server-generic-unix-2.4.0.tar.gz 

What application? Some are accesible through commandline, others get an pretty icon in the application menu. Be more specific.

Do you want to know where the executables and config files reside or do you want to execute it and don’t know how?

ok. i actually want to know that as in windows if i install application i can see it in program files similarly in ubuntu where to locate the installed application. I just installed RabbitMq and want to know where it is residing i need to configur its run.sh file

@ das_weezul :- yes I want to know all things which are done to my box when i click install from synaptic package manager . i am a newbie on ubuntu. so any links are welcomed

Читайте также:  Get input event linux

One of the answers suggests the following dpkg-query -c You cannot do that to a deb file. I suspect the poster meant to use dpkg-deb with the same params dpkg-deb -c Which lists the files as expected.

Источник

Работа с пакетами при помощи dpkg

Dpkg — основная программа управления пакетами в Debian linux и производных дистрибутивах. Он используется для установки, сборки, удаления и управления пакетами. Aptitude является основным интерфейсом для dpkg.

Вот некоторые наиболее часто используемые варианты использования команды dpkg .

1. Dpkg, установка пакета

Для установки .deb пакета используется ключ -i ( —install ):

# dpkg -i flashpluginnonfree_2.8.2+squeeze1_i386.deb Selecting previously unselected package flashplugin-nonfree. (Reading database . 465729 files and directories currently installed.) Unpacking flashplugin-nonfree (from flashplugin-nonfree_3.2_i386.deb) . Setting up flashplugin-nonfree (1:3.2) . .

2. Dpkg, список установленных пакетов

Чтобы посмотреть установленные пакеты, используется ключ -l ( —list ):

# dpkg -l Desired=Unknown/Install/Rcodeove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Desc . +++-=============================================-==================== . ii acpi 1.6-1 amd64 displays information . ii acpi-support-base 0.140-5+deb7u3 all scripts for handling . ii acpid 1:2.0.16-1+deb7u1 amd64 Advanced Configurati .

Чтобы узнать установлен-ли конкретный пакет, нужно указать его имя:

# dpkg -l nginx Desired=Unknown/Install/Rcodeove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Desc . +++-=============================================-==================== . ii nginx 1.8.0-1~wheezy amd64 high performance .

3. Dpkg, удалить пакет

Для удаления .deb пакета используется ключ -r ( —remove ) с указанием имени пакета, например flashpluginnonfree , полное название flashplugin-nonfree_3.2_i386.deb , указывать не обязательно.

# dpkg -r flashpluginnonfree (Reading database . 142891 files and directories currently installed.) Rcodeoving flashpluginnonfree . Processing triggers for man-db . Processing triggers for menu . .

Ключ -r позволяет удалить только сам пакет, чтобы удалить пакет вместе с файлами конфигурации, вместо -r , используйте ключ -P ( purge ):

# dpkg -P flashpluginnonfree

4. Dpkg, просмотр содержимого пакета

Чтобы посмотреть содержимое пакета, используется ключ -c ( —contents ):

# dpkg -c flashplugin-nonfree_3.2_i386.deb drwxr-xr-x root/root 0 2012-12-14 22:54 ./ drwxr-xr-x root/root 0 2012-12-14 22:54 ./usr/ drwxr-xr-x root/root 0 2012-12-14 22:54 ./usr/bin/ drwxr-xr-x root/root 0 2012-12-14 22:54 ./usr/lib/ .

5. Dpkg, проверить, установлен пакет или нет

Для этого используется ключ -s ( —status )

# dpkg -s flashplugin-nonfree Package: flashplugin-nonfree Status: install ok installed Priority: optional .

6. Dpkg, куда установлены файлы пакета

Чтобы посмотреть расположение, установленных пакетом файлов, используйте ключ -L ( —listfiles ):

# dpkg -L mysql-common /. /usr /usr/share /usr/share/doc .

7. Dpkg, установить все пакеты из конкретной директории

Чтобы рекурсивно обойти указанную директорию и ее поддиректории, устанавливая все файлы *.deb , используйте ключи -R ( —recursive ) и -i ( —install ). Следующая команда установит все *.deb файлы из директории debpackages :

# dpkg -R --install debpackages/ (Reading database . 465836 files and directories currently installed.) Preparing to replace flashplugin-nonfree 1:3.2 (using . /flashplugin-nonfree_3.2_i386.deb) . Unpacking replaccodeent flashplugin-nonfree . Setting up flashplugin-nonfree (1:3.2) . .

8. Dpkg, распаковать пакет, не конфигурируя его

Для распаковки пакета используется опция —unpack , при этом не будет выполняться конфигурирование или установка:

# dpkg --unpack flashplugin-nonfree_3.2_i386.deb

9. Dpkg, конфигурирование распакованного пакета

Опция —onfigure выполнит переконфигурацию уже распакованного пакета

# dpkg --configure flashplugin-nonfree Setting up flashplugin-nonfree (1:3.2) .

10. Dpkg, обновить информации о доступности пакета

Опция —update-avail обновляет устаревшую информацию о доступности пакета в файле пакетов:

# dpkg –-update-avail package_name

11. Dpkg, удаление информации о доступности пакетов

Опция —clear-avaial удалит текущую информацию о доступности пакетов

Читайте также:  Zoom linux сменить язык

12. Dpkg, забыть удаленные и неиспользуемые пакеты

Чтобы система «забыла» удаленные и неиспользуемые пакеты, служит опция —forget-old-unavail :

13. Лицензия dpkg

14. Версия dpkg

# dpkg --version Debian `dpkg' package managcodeent program version 1.16.16 (amd64). This is free software; see the GNU General Public License version 2 or later for copying conditions. There is NO warranty.

Источник

Оцените статью
Adblock
detector