Unable to make php works on Ubuntu

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
-1
down vote

favorite












I have already apache working and i have created a virtual host but php is not working, im getting just plain text, this is the error during the install:



 Error found on processing:
javascript-common
libapache2-mod-php7.2
libapache2-mod-php
E: Sub-process /usr/bin/dpkg returned an error code (1)


This is what im doing:



sudo rm -Rf var/lib/dpkg/lock ; sudo apt-get dist-upgrade -y


Also tried



sudo apt-get install php7.0 libapache2-mod-php7.0 php7.0-mcrypt






share|improve this question




















  • In the first formatted text block please copy/paste the complete error message, not just the tail.
    – karel
    Apr 26 at 16:23











  • I am seeing this: libapache2-mod-php7.2 when your installing this: php7.0 libapache2-mod-php7.0 php7.0-mcrypt'. Please check your php version with php -version` and install the right version
    – George Udosen
    Apr 26 at 16:29











  • i have changed to 7.2 and still getting: Configurando libapache2-mod-php7.0 (7.0.29-1+ubuntu17.10.1+deb.sury.org+1) ... dpkg: error al procesar el paquete libapache2-mod-php7.0 (--configure): el subproceso instalado el script post-installation devolvió el código de salida de error 1 Configurando javascript-common (11) ... dpkg: error al procesar el paquete javascript-common (--configure): el subproceso instalado el script post-installation devolvió el código de salida de error 1
    – lucasvm1980
    Apr 26 at 18:30















up vote
-1
down vote

favorite












I have already apache working and i have created a virtual host but php is not working, im getting just plain text, this is the error during the install:



 Error found on processing:
javascript-common
libapache2-mod-php7.2
libapache2-mod-php
E: Sub-process /usr/bin/dpkg returned an error code (1)


This is what im doing:



sudo rm -Rf var/lib/dpkg/lock ; sudo apt-get dist-upgrade -y


Also tried



sudo apt-get install php7.0 libapache2-mod-php7.0 php7.0-mcrypt






share|improve this question




















  • In the first formatted text block please copy/paste the complete error message, not just the tail.
    – karel
    Apr 26 at 16:23











  • I am seeing this: libapache2-mod-php7.2 when your installing this: php7.0 libapache2-mod-php7.0 php7.0-mcrypt'. Please check your php version with php -version` and install the right version
    – George Udosen
    Apr 26 at 16:29











  • i have changed to 7.2 and still getting: Configurando libapache2-mod-php7.0 (7.0.29-1+ubuntu17.10.1+deb.sury.org+1) ... dpkg: error al procesar el paquete libapache2-mod-php7.0 (--configure): el subproceso instalado el script post-installation devolvió el código de salida de error 1 Configurando javascript-common (11) ... dpkg: error al procesar el paquete javascript-common (--configure): el subproceso instalado el script post-installation devolvió el código de salida de error 1
    – lucasvm1980
    Apr 26 at 18:30













up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











I have already apache working and i have created a virtual host but php is not working, im getting just plain text, this is the error during the install:



 Error found on processing:
javascript-common
libapache2-mod-php7.2
libapache2-mod-php
E: Sub-process /usr/bin/dpkg returned an error code (1)


This is what im doing:



sudo rm -Rf var/lib/dpkg/lock ; sudo apt-get dist-upgrade -y


Also tried



sudo apt-get install php7.0 libapache2-mod-php7.0 php7.0-mcrypt






share|improve this question












I have already apache working and i have created a virtual host but php is not working, im getting just plain text, this is the error during the install:



 Error found on processing:
javascript-common
libapache2-mod-php7.2
libapache2-mod-php
E: Sub-process /usr/bin/dpkg returned an error code (1)


This is what im doing:



sudo rm -Rf var/lib/dpkg/lock ; sudo apt-get dist-upgrade -y


Also tried



sudo apt-get install php7.0 libapache2-mod-php7.0 php7.0-mcrypt








share|improve this question











share|improve this question




share|improve this question










asked Apr 26 at 16:19









lucasvm1980

142




142











  • In the first formatted text block please copy/paste the complete error message, not just the tail.
    – karel
    Apr 26 at 16:23











  • I am seeing this: libapache2-mod-php7.2 when your installing this: php7.0 libapache2-mod-php7.0 php7.0-mcrypt'. Please check your php version with php -version` and install the right version
    – George Udosen
    Apr 26 at 16:29











  • i have changed to 7.2 and still getting: Configurando libapache2-mod-php7.0 (7.0.29-1+ubuntu17.10.1+deb.sury.org+1) ... dpkg: error al procesar el paquete libapache2-mod-php7.0 (--configure): el subproceso instalado el script post-installation devolvió el código de salida de error 1 Configurando javascript-common (11) ... dpkg: error al procesar el paquete javascript-common (--configure): el subproceso instalado el script post-installation devolvió el código de salida de error 1
    – lucasvm1980
    Apr 26 at 18:30

















  • In the first formatted text block please copy/paste the complete error message, not just the tail.
    – karel
    Apr 26 at 16:23











  • I am seeing this: libapache2-mod-php7.2 when your installing this: php7.0 libapache2-mod-php7.0 php7.0-mcrypt'. Please check your php version with php -version` and install the right version
    – George Udosen
    Apr 26 at 16:29











  • i have changed to 7.2 and still getting: Configurando libapache2-mod-php7.0 (7.0.29-1+ubuntu17.10.1+deb.sury.org+1) ... dpkg: error al procesar el paquete libapache2-mod-php7.0 (--configure): el subproceso instalado el script post-installation devolvió el código de salida de error 1 Configurando javascript-common (11) ... dpkg: error al procesar el paquete javascript-common (--configure): el subproceso instalado el script post-installation devolvió el código de salida de error 1
    – lucasvm1980
    Apr 26 at 18:30
















In the first formatted text block please copy/paste the complete error message, not just the tail.
– karel
Apr 26 at 16:23





In the first formatted text block please copy/paste the complete error message, not just the tail.
– karel
Apr 26 at 16:23













I am seeing this: libapache2-mod-php7.2 when your installing this: php7.0 libapache2-mod-php7.0 php7.0-mcrypt'. Please check your php version with php -version` and install the right version
– George Udosen
Apr 26 at 16:29





I am seeing this: libapache2-mod-php7.2 when your installing this: php7.0 libapache2-mod-php7.0 php7.0-mcrypt'. Please check your php version with php -version` and install the right version
– George Udosen
Apr 26 at 16:29













i have changed to 7.2 and still getting: Configurando libapache2-mod-php7.0 (7.0.29-1+ubuntu17.10.1+deb.sury.org+1) ... dpkg: error al procesar el paquete libapache2-mod-php7.0 (--configure): el subproceso instalado el script post-installation devolvió el código de salida de error 1 Configurando javascript-common (11) ... dpkg: error al procesar el paquete javascript-common (--configure): el subproceso instalado el script post-installation devolvió el código de salida de error 1
– lucasvm1980
Apr 26 at 18:30





i have changed to 7.2 and still getting: Configurando libapache2-mod-php7.0 (7.0.29-1+ubuntu17.10.1+deb.sury.org+1) ... dpkg: error al procesar el paquete libapache2-mod-php7.0 (--configure): el subproceso instalado el script post-installation devolvió el código de salida de error 1 Configurando javascript-common (11) ... dpkg: error al procesar el paquete javascript-common (--configure): el subproceso instalado el script post-installation devolvió el código de salida de error 1
– lucasvm1980
Apr 26 at 18:30











1 Answer
1






active

oldest

votes

















up vote
1
down vote













I was able fix this by removing all php related and installed again by using:



sudo apt-get purge `dpkg -l | grep php| awk 'print $2' |tr "n" " "`





share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1028470%2funable-to-make-php-works-on-ubuntu%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    I was able fix this by removing all php related and installed again by using:



    sudo apt-get purge `dpkg -l | grep php| awk 'print $2' |tr "n" " "`





    share|improve this answer
























      up vote
      1
      down vote













      I was able fix this by removing all php related and installed again by using:



      sudo apt-get purge `dpkg -l | grep php| awk 'print $2' |tr "n" " "`





      share|improve this answer






















        up vote
        1
        down vote










        up vote
        1
        down vote









        I was able fix this by removing all php related and installed again by using:



        sudo apt-get purge `dpkg -l | grep php| awk 'print $2' |tr "n" " "`





        share|improve this answer












        I was able fix this by removing all php related and installed again by using:



        sudo apt-get purge `dpkg -l | grep php| awk 'print $2' |tr "n" " "`






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 26 at 18:45









        lucasvm1980

        142




        142



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1028470%2funable-to-make-php-works-on-ubuntu%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            Which professions warranted travel in Medieval times?

            How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

            Trouble downloading packages list due to a “Hash sum mismatch” error