Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I can't install php5-mcrypt on ubuntu 14.04. I'm doing this:

$ sudo apt-get install php5-mcrypt

And getting this:

Reading package lists... Done    
Building dependency tree       
Reading state information... Done   
E: Unable to locate package php5-mcrypt
share|improve this question
up vote 4 down vote accepted

php5-mcrypt is located in the universe repository.

Open Dash, go to Software and Updates and be sure to check the universe repository (Free and opensource software maintained by community).


Run the below command on terminal to enable universe repository,

sudo add-apt-repository universe


sudo apt-get update
sudo apt-get install php5-mcrypt

Should work.

share|improve this answer
And if this is an Ubuntu Server system (or otherwise) with no GUI, How do I enable the “Universe” repository from the command line? should help. – Eliah Kagan Jun 14 '14 at 12:04
It worked (I mean the original post), thank you very much! – user3740266 Jun 14 '14 at 12:07

add-apt-repository on Ubuntu 12.10 apparently comes from this one: $ apt-get install software-properties-common After that, and another apt-get update I could find php5-mcrypt

share|improve this answer
Ubuntu 12.10 is way end-of-life. This isn't 12.10 specific, but please know that you should upgrade and post answers based on current Ubuntu versions. – gertvdijk Sep 26 '14 at 8:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.