运行“sudo dpkg --listfiles apache2”时列出的几个文件

运行“sudo dpkg --listfiles apache2”时列出的几个文件

我通过运行安装了 apache2 sudo apt-get install apache2,但似乎出现了错误。下面是输出。为什么?

me@mycomputer:/usr/share/apache2$ sudo apt-get install apache2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
apache2 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 36 not upgraded.
me@mycomputer:/usr/share/apache2$ sudo dpkg --listfiles apache2
/.
/usr
/usr/share
/usr/share/bug
/usr/share/bug/apache2
/usr/share/bug/apache2/control
/usr/share/doc
/usr/share/bug/apache2/script
/usr/share/doc/apache2

更新

运行sudo apt-get install --reinstall apache2,输出为:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  dovecot-core libdbd-sqlite3-perl dovecot-imapd dnsmasq
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 36 not upgraded.
Need to get 0 B/1,498 B of archives.
After this operation, 0 B of additional disk space will be used.
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
(Reading database ... 194506 files and directories currently installed.)
Preparing to replace apache2 2.2.22-1ubuntu1.10 (using .../apache2_2.2.22-1ubuntu1.10_amd64.deb) ...
Unpacking replacement apache2 ...
Setting up apache2 (2.2.22-1ubuntu1.10) ...

运行sudo service apache2 status,输出为:

sh: 0: getcwd() failed: No such file or directory
Apache2 is running (pid 22408).

看起来 apache2 正在运行,但是如何列出 apache2 的内容?另外,/etc/apache2 中有文件:

/etc/apache2$ ls
apache2.conf  envvars     magic           mods-enabled  sites-available
conf.d        httpd.conf  mods-available  ports.conf    sites-enabled

为什么我不能列出全部?

更新

不知道为什么被否决了???也许这个问题太简单了,不适合在这里发布???

答案1

你看到的是12.04 正常, 在哪儿元包。实际的apache2二进制文件、模块等是apache2-mpm-*apache2-binapache2-common软件包。在较新版本的 Ubuntu 中,apache2软件包还提供配置文件。

相关内容