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

phpstorm-8

PHPStorm 8 (early access version) released – for free

JetBrains have just released an Early Access version of the upcoming PHPStorm 8. In case you never worked with PHPStorm

MINI, an extremely simple barebone PHP application

For my daily work I often needed to setup super-simple PHP applications, just some more or less static pages plus

Migrating Wikipedia to HHVM (@Scale Conference 2014)

Awesome topic, superfresh, directly from Scale Conference 2014. The title says everthing. Full quote from video’s description: As a top

Berlin, prepare for TOA conference (15th – 17th of July)

If you are in Berlin right now (and have 80-300 € to spend and 2-3 days of holidays (or “spontanious

phpstorm-8

Ignore .idea folder from git in PHPStorm

By default (?) PHPStorm will create a hidden folder named .idea directly within your project, containing user-specific stuff like chosen

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

shadow dom

Crossbrowser-safe HTML5 video (IE6+) with a few lines of code and just one .mp4 video file

No time to read the full article ? Get the code directly here on GitHub: panique/html5-video. Publishing a video on

JavaScript ECMAScript6 – A short video introduction (5min)

Excellent introduction into the new ECMAScript6, the spec behind JavaScript. This article was written quite a while ago (7 years),

Perfect HTML email templates for perfect HTML emails (outlook!) with INK

The people behind FOUNDATION, the excellent responsive frontend framework, have just released a set of highly professional, perfectly compatible HTML

The architecture of StackOverflow

One of the most interesting talks these weeks, and a rare insight into one of the most active pages on

1/4

Categories

Search

What’s new in PHPStorm 10 (Official promo video)
How to show the available version of a package (before doing apt-get install)
offf-2014
Europeans: Get ready for OFFF conference / festival in Barcelona, May 2014
php
A super-simple introduction into PHP namespaces (7min video)
vagrant
How to setup a (or multiple) server/LAMP-stack inside a virtual machine for local development with Vagrant and PuPHPet
atomic-design
An introduction into Atomic Design, a super-clean way to style web applications
php
How to install PHP curl extension (in 5 seconds)
goodbye-lamp-going-hhvm-nosql-nginx-php
[RePost] Goodbye LAMP: Going Nginx, NoSQL, HHVM (41min conference talk with Arne Blankerts)
Ghost
[FREE SERVER PROMO] Install GHOST for free on a free SSD server with this coupon
GitHub finally introduces repo traffic stats
php
[Link] Excellent PHP best practices, 2014 style
Increase your HTML / CSS coding speed with EMMET
battlefield-3-free
Electronic Arts / Origin offers Battlefield 3 for free (limited promo action) !
php
How to use the PHP 5.5 password hashing functions
First look on Gitter, the chat for GitHub

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 All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
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