你好,我正在尝试在我的 ubuntu 13.10 机器上安装一个邮件服务器,我已经安装了 LAMP 服务器,并且运行良好,我希望我的电脑能够发送电子邮件(作为服务器工作),所以我决定安装 sendmail
sudo apt-get install sendmail
但是,当我尝试访问 libssh2-php 时,它给出了一个错误,我删除了 libssh2-php,并尝试重新安装,但它给出了以下错误
$sudo apt-get install libssh2-php
`Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
libssh2-php
0 upgraded, 1 newly installed, 0 to remove and 66 not upgraded.
Need to get 0 B/28,6 kB of archives.
After this operation, 121 kB of additional disk space will be used.
Selecting previously unselected package libssh2-php.
(Reading database ... 291773 files and directories currently installed.)
Unpacking libssh2-php (from .../libssh2-php_0.11.3-0.1build2_amd64.deb) ...
Setting up libssh2-php (0.11.3-0.1build2) ...
Creating config file /etc/php5/conf.d/ssh2.ini with new version
cp: cannot create regular file ‘/etc/php5/conf.d/ssh2.ini’: No such file or directory
dpkg: error processing libssh2-php (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
libssh2-php
E: Sub-process /usr/bin/dpkg returned an error code (1)
我不确定是否应该创建无法找到的 /etc/php5/conf.d/ssh2.ini 目录......
但是我在我的机器上找到了 conf.d 目录,它位于
/etc/php5/cli/conf.d
我考虑过移动目录,但我担心其他东西会停止工作,因为它们在 /etc/php5/cli/conf.d 上运行
跑步sudo dpkg --configure -a
回报:
Setting up libssh2-php (0.11.3-0.1build2) ...
Creating config file /etc/php5/conf.d/ssh2.ini with new version
cp: cannot create regular file ‘/etc/php5/conf.d/ssh2.ini’: No such file or directory
dpkg: error processing libssh2-php (--configure): subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing: libssh2-php
有谁能够帮助我 ??
提前发送
答案1
解决方法如下:
sudo mkdir -p /etc/php5/conf.d/
sudo apt-get install libssh2-php