1

I'm kind of new to the linux os and I'm having trouble installing php. i needed a few tools for jasper which alwys show up in the error message.

    sudo apt-get install php -y     
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  realpath
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  libapache2-mod-php7.0 php-common php7.0 php7.0-cli php7.0-common php7.0-json
  php7.0-opcache php7.0-readline
Suggested packages:
  php-pear
The following NEW packages will be installed:
  libapache2-mod-php7.0 php php-common php7.0 php7.0-cli php7.0-common
  php7.0-json php7.0-opcache php7.0-readline
0 upgraded, 9 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/2,712 kB of archives.
After this operation, 11.1 MB of additional disk space will be used.
Selecting previously unselected package php-common.
dpkg: warning: files list file for package 'libasound2-dev:armhf' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'git-core' missing; assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
 files list file for package 'bison' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)

I do not understand this please help.

  • Try sudo dpkg --configure -a and then run apt install again – rohtua Feb 12 at 16:30
  • pi@raspberrypi:~ $ s dpkg --configure -a pi@raspberrypi:~ $ s apt install Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required: realpath Use 'sudo apt autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. – SteroidCookies Feb 12 at 16:50
  • still the same -.- – SteroidCookies Feb 12 at 16:51
  • I've found a few suggestions here that may help. serverfault.com/questions/430682/… – rohtua Feb 12 at 17:02
0

It seems that your files-list files are broken. You can try to reinitialize them. That means to purge them under control of the package manager. Then download them from scratch. How to do it you can look at Raspberry Pi sudo apt-get update not working.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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