php5-mcrypt をインストールできません

php5-mcrypt をインストールできません

私は PHP で mcrypt をインストールしようとしていますが、できません。もしそうしたらphp test.php | grep mcrypt(test.php が含まれているところphpinfo()) 何も表示されないので、インストールしたいと思います。

そうすると、sudo apt-get install php5-mcrypt次のようになります:

E: Unable to locate package php5-mcrypt

やったらsudo apt-cache search mcrypt何も起こらない。

私の/etc/apt/sources.listはこちらです

deb cdrom:[Ubuntu 13.04 _Raring Ringtail_ - Release amd64 (20130424)]/ raring main restricted
deb http://archive.ubuntu.com/ubuntu raring main restricted
deb-src http://archive.ubuntu.com/ubuntu raring main restricted

deb http://security.ubuntu.com/ubuntu raring-security main restricted
deb-src http://security.ubuntu.com/ubuntu raring-security main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu raring-updates main restricted
deb-src http://archive.ubuntu.com/ubuntu raring-updates main restricted

## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
 deb http://archive.ubuntu.com/ubuntu raring universe
 deb-src http://archive.ubuntu.com/ubuntu raring universe
 deb http://archive.ubuntu.com/ubuntu raring-updates universe
 deb-src http://archive.ubuntu.com/ubuntu raring-updates universe
 deb http://security.ubuntu.com/ubuntu raring-security universe
 deb-src http://security.ubuntu.com/ubuntu raring-security universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
 deb http://archive.ubuntu.com/ubuntu raring multiverse
 deb-src http://archive.ubuntu.com/ubuntu raring multiverse
 deb http://archive.ubuntu.com/ubuntu raring-updates multiverse
 deb-src http://archive.ubuntu.com/ubuntu raring-updates multiverse
 deb http://security.ubuntu.com/ubuntu raring-security multiverse
 deb-src http://security.ubuntu.com/ubuntu raring-security multiverse

deb http://us.archive.ubuntu.com/ubuntu/ quantal universe
deb-src http://us.archive.ubuntu.com/ubuntu/ quantal universe
deb http://us.archive.ubuntu.com/ubuntu/ quantal-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ quantal-updates universe

deb / deb-srcの最後のセットはhttp://forums.linuxmint.com/viewtopic.php?f=90&t=135896

によるとhttps://stackoverflow.com/q/19446679/569976これは動作するはずです:

sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available
sudo php5enmod mcrypt

唯一の問題: /etc/php5/conf.d/mcrypt.ini がありません。

何かアイデアはありますか? Ubuntu で動作させるには、自分でソースから mcrypt をコンパイルする必要がありますか? Ubuntu 13.04 を実行しています。

ありがとう!

答え1

あなたも私と同じ問題を抱えているかどうかはわかりませんが (私は Ubuntu 13.04 ではなく Ubuntu 13.10 を実行しています)、これは私にとってはうまくいきました。元の回答は次のとおりです。https://stackoverflow.com/questions/19446679/mcrypt-not-present-after-ubuntu-upgrade-to-13-10

sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available
sudo php5enmod mcrypt
sudo service apache2 restart

関連情報