Logo
  • PHP
    • HipHop / HHVM
    • Modern PHP
    • PHPStorm
    • LAMP
    • Laravel
    • Composer
    • PDO
  • JavaScript
    • node.js
    • AngularJS
  • CSS
    • SASS
    • “CSS4” (CSS level 4)
  • HTML
  • Git
  • LAMP
  • Vagrant
  • UI / UX
  • Architecture of …
  • Off-Topic
With ♥ from Berlin
November 3, 2013
Chris
PHP
4

How to install the mcrypt php extension (to use Laravel 4)

PreviousNext
php

When installing Laravel 4 on a fresh Ubuntu or Debian system, you’ll probably get this error message: “Laravel requires the Mcrypt PHP extension.”

To install the mcrypt php extension, do this:

sudo apt-get install php5-mcrypt

and restart the server

sudo service apache2 restart

By the way, this might be off-topic, but let’s be honest: Laravel is a wonderful thing, but the install instructions are .. well… totally incomplete. It’s impossible to install laravel without doing some additional things that are simply not documented. The official tutorial completely misses the installation of the necessary plugins, necessary mod_rewrite shit and necessary vhost actions.

Go here if you need a full tutorial on how to install Laravel 4 on Ubuntu 12.04 LTS.

This article was written quite a while ago (9 years), please keep this in mind when using the information written here. Links, code and commands might be outdated or broken.

Random articles

  • Extremely easy SASS in Laravel (with pure PHP)Extremely easy SASS in Laravel (with pure PHP)
  • [Link] How to set up HipHop, Nginx and Laravel in Ubuntu 12.04 LTS (in a Vagrant box)[Link] How to set up HipHop, Nginx and Laravel in Ubuntu 12.04 LTS (in a Vagrant box)
  • Generate Vagrant boxes with Laravel, HipHop, Nginx, WordPress, MySQL, MariaDB, MongoDB, RabbitMQ etc. with one clickGenerate Vagrant boxes with Laravel, HipHop, Nginx, WordPress, MySQL, MariaDB, MongoDB, RabbitMQ etc. with one click
  • Install Laravel 4 on Ubuntu 12.04 LTS (a how-to tutorial)Install Laravel 4 on Ubuntu 12.04 LTS (a how-to tutorial)
  • PHPStorm: 42 Tips and Tricks (47min video talk by Mikhail Vink at Dutch PHP Conference 2015)PHPStorm: 42 Tips and Tricks (47min video talk by Mikhail Vink at Dutch PHP Conference 2015)
  • What’s new in PHPStorm 9What’s new in PHPStorm 9
  • Experimenting with HHVM at Etsy (Link)Experimenting with HHVM at Etsy (Link)
  • Dangerous Performance Myths in the Web (video talk by Thomas Lohner, PHPUG Latvia)Dangerous Performance Myths in the Web (video talk by Thomas Lohner, PHPUG Latvia)
  • Install MINI in 30 seconds inside Ubuntu 14.04 LTSInstall MINI in 30 seconds inside Ubuntu 14.04 LTS
laravelmcryptmcrypt php extensionPHP
Share this

4 Comments

  • xuamox
    May 4, 2014 5:59 pm

    I get sudo: apt-get: command not found when I try to install mcrypt – any ideas?

    Reply
  • xuamox
    May 4, 2014 5:57 pm

    I totally agree. For those of us starting out, it has been a total pain trying to get things started. I wasted countless hours just trying to get Laraval running on MAMP, and got mostly there, but had a ton of issues with basic routing. On the forums, some users suggested trying out Vagrant, and that went a lot smoother, but just tried to create my database and got the missing mcrypt error. I still have not found a bash file that gets everything just right for Laravel. Someone should do a Laravel Vagrant tutorial that explains things in more detail. The best tutorial I have found so far is http://culttt.com/2013/06/17/setting-up-vagrant-with-laravel-4/ – but even that one caused some issues for me. The author graciously pointed me to https://github.com/fideloper/Vaprobash – and that got my LAMP stack up on Vagrant. But still does not help with getting Laravel working on Vagrant. Anyhow, slowly making progress, but I just thought things would be a lot simpler to get started.

    Reply
    • Chris
      May 4, 2014 6:28 pm

      Check http://www.dev-metal.com/install-laravel-4-ubuntu-12-04-lts/

      Reply
      • 3825
        January 1, 2016 1:06 am

        Thank you for writing this. Now that we have somewhat decent Internet connections, I wonder if it would be easier to just make a vagrant or something box that is preconfigured with laravel stuff.

        Edit: here’s the basic idea https://hashicorp.com/blog/otto.html

        Reply

Leave A Comment Cancel reply

How Instagram.com works

This article was written quite a while ago (8 years), please keep this in mind when using the information written

php ide

Sitepoint asks for your favourite PHP IDE – take part!

Bruno Skvorc ask for your favourite PHP IDE in this new article on Sitepoint. If you use one, then take

Dangerous Performance Myths in the Web (video talk by Thomas Lohner, PHPUG Latvia)

A very interesting talk from Latvia’s (not 100% sure) PHP usergroup meeting: Thomas Lohner (of SysEleven) explains why some of

node.js

PayPal drops Java, goes node.js / JavaScript

First: this is not a Java-vs.-AnyOtherLanguage diss, just an article about a very interesting development: Using “frontend-languages” for serious server-side

Awesome next-gen PS4 graphics in “The Order: 1886”

We are entering a very interesting time: The differences between cinematic movies and video games are getting lesser and lesser.

html6

Is this the first HTML6 specification?

  I just found this very interesting “project” including an active, but unpopular GitHub repo: http://html6spec.com/ https://github.com/OscarGodson/HTML6 Looks like these

First look on Gitter, the chat for GitHub

GitHub has definitly become the #1 platform for git-based public repositories on the planet, no question. The site offers excellent

goodbye-lamp-going-hhvm-nosql-nginx-php

[RePost] Goodbye LAMP: Going Nginx, NoSQL, HHVM (41min conference talk with Arne Blankerts)

Another excellent find by Germany’s PHP Magazin in the article “Nginx, NoSQL, HHVM: Goodbye LAMP Stack?“: 41 minutes super-interesting (english)

Ghost

[FREE SERVER PROMO] Install GHOST for free on a free SSD server with this coupon

A little off-topic, but highly interesting: In April 2013 the former User Interface Head of WordPress (and WordPress expert) John

How to hack time (KUNG FURY promo campaign)

:) Finally, KUNG FURY is out! No need for further words, unless you lived in a cave for the last

1/4

Categories

Search

Soundcloud’s “VP of Engineering” about using SSDs
php
12 tools for better PHP quality
organizing css
Jonathan Snook – CSS is a Mess – How to organize CSS in big projects (54min video talk)
php
PHP.net hacked, but most things are fine again
How major web companies (and banks) handle passwords quite wrong
php
appserver.io – A New Way of Magento Enterprise Infrastructure (26min video talk)
hiphop php
Vote for “Hack” for HipHop/HHMV support (future style PHP) in PHPStorm 8
phpstorm-8
PHPStorm 8 has just been released
phpstorm-8
A PHPStorm shortcuts cheat sheet (for Windows, Mac OS and Linux)
A collection of beautiful ajax loaders / spinners in pure .svg / CSS
php
How to install/setup latest version of PHP 5.5 on Debian Wheezy 7.0/7.1/7.2 (and how to fix the GPG key error)
vagrant
A preinstalled Vagrant box with PHP HipHop / HHVM and Ubuntu 13.10 (Saucy Salamander)
phpstorm 7.0 php
How to install GitHub’s, NetBeans’s and Sublime2’s syntax highlighting code colours theme in PHPStorm 6/7
github-logo-octocat
GitHub rolls out .PSD diff and viewing
php
[Link] How to create, read, update and delete (CRUD) with PDO, MySQLi and MySQL the right way (prepared statements)

Tags

apache bash centos composer conference coupon CSS debian fonts framework git GitHub hack HHVM HipHop HTML HTML5 IDE JavaScript JS LAMP laravel linux mod_rewrite MVC MySQL Nginx optimization PHP PHP 5.5 PHP 5.6 phpmyadmin PHPStorm security server SSD Ubuntu UI UX vagrant video virtual machine voucher VPS wordpress
Side-Project: Wordle-Solver:
www.wordle-helper.info

Pages

  • Privacy Policy
 
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT