PocketMine / PocketMine-MP

Legacy PocketMine-MP repository. Head to https://github.com/pmmp for up to date software.
https://www.pocketmine.net/
GNU Lesser General Public License v3.0
1.26k stars 660 forks source link

Couldn't install pocketmine-MP on Ubuntu Mate 16.04 64-bit #4241

Closed OpnSrcConstruction closed 6 years ago

OpnSrcConstruction commented 8 years ago

Issue description:

Couldn't install pocketmine-MP on Ubuntu Mate 16.04 64-bit

The Ubuntu command line tells me I don't have PHP 7 installed and to use the installer, whatever that means.

Steps to reproduce the issue

  1. sudo apt install perl gcc g++ make automake libtool autoconf m4
  2. wget -q -O - http://get.pocketmine.net/ | bash
  3. ./start.sh
  4. following error occured: Couldn't find a working PHP 7 binary, please use the installer.
  5. $ sudo apt install php7.0
  6. removed the working directory, ran the wget command from step 2, the ./start.sh step from step three; and got the same error from under step 4.

    OS and versions

  7. PocketMine-MP:
  8. PHP: $ php --version PHP 7.0.4-7ubuntu2.1 (cli) ( NTS )
  9. OS: Ubuntu Mat 16.04 64-bit

I got slightly further by downloading the PHP_7.0.0RC2 from here https://bintray.com/pocketmine/PocketMine/download_file?file_path=PHP_7.0.0RC2_x86-64_Linux.tar.gz

I uncompressed the tar archive into the pocketmine folder, so that there would be a bin directory, within the /bin/php7 directory.

I stopped getting the above error, but started getting the below error:

Failed loading /var/lib/jenkins/jobs/PHP-PocketMine-Linux/workspace/compile/linux/64bit/bin/php7/lib/php/extensions/no-debug-zts-20141001/opcache.so: /var/lib/jenkins/jobs/PHP-PocketMine-Linux/workspace/compile/linux/64bit/bin/php7/lib/php/extensions/no-debug-zts-20141001/opcache.so: cannot open shared object file: No such file or directory 08:36:55 [CRITICAL] Unable to find the Weakref extension. 08:36:55 [CRITICAL] Please use the installer provided on the homepage, or recompile PHP again.

I'm not Linux stupid, just PHP stupid. But it also seems like I'm trying to install this when PHP7 support is really new, and all of the bugs haven't been worked out of the installer script yet.

ghost commented 8 years ago

@OpnSrcConstruction https://forums.pocketmine.net/threads/latest-phar-and-php-binaries.16037/

ReadTheForums

OpnSrcConstruction commented 8 years ago

First problem solved. Now it's giving me a new error... oh the joys of PHP...

Failed loading /var/lib/jenkins/jobs/PHP-PocketMine-Linux/workspace/compile/linux/64bit/bin/php7/lib/php/extensions/no-debug-zts-20141001/opcache.so: /var/lib/jenkins/jobs/PHP-PocketMine-Linux/workspace/compile/linux/64bit/bin/php7/lib/php/extensions/no-debug-zts-20141001/opcache.so: cannot open shared object file: No such file or directory 08:36:55 [CRITICAL] Unable to find the Weakref extension. 08:36:55 [CRITICAL] Please use the installer provided on the homepage, or recompile PHP again.

jondaley commented 8 years ago

I had the same run problem on Debian (stretch). The installer installs php5 rather than php7.

I downloaded the pocketmine.net file installer (and then named it pm.sh) and then ran it as "./pm.sh -c" to force the compile, which mostly worked, though I had to edit pm.sh and commented out the rewrite of compile.sh and re-ran ./pm -c again.

The wizard worked, and started the server, but then I got:

Fatal error: Cannot use pocketmine\nbt\tag\Float as Float because 'Float' is a special class name in phar:///home/minecraf/PocketMine-MP.phar/src/pocketmine/Server.php on line 71

so, it looks like I got further than you...

I'll try editing this code and see if I can fix this one too. Almost there?!

jondaley commented 8 years ago

Ah - the version of pocketmine that comes with the installer doesn't work on php7. Swell. I guess it is sort of half php5 and half php7.

I manually downloaded the pocketmine php code from git: https://forums.pocketmine.net/threads/installation-problem.15479/

The server now loads, but players can't connect. Getting there little by little.

robske110 commented 8 years ago

https://bintray.com/pocketmine/PocketMine all what you need is there, phars working for 0.15 and php7 bins for almost everything

bigtbigtbigt commented 8 years ago

Try changing the paths in start.sh from /php7/ to /php5/. This helped me get the server running. It appears PHP7 is not required. Same issue, tho. The server loads, but players can't connect because MCPE is now 0.15 and the version I have only supports MCPE 0.10

stoontechguy commented 7 years ago

@robske110 The PocketMine-MP.phar at https://bintray.com/pocketmine/PocketMine is only 33bytes but the old one is 2MB.

robske110 commented 7 years ago

My comment is 1 year old. PM has moved to pmmp https://github.com/pmmp/PocketMine-MP. And phars are available here https://jenkins.pmmp.io/job/PocketMine-MP/.

stoontechguy commented 7 years ago

@robske110 Thanks! the latest threat I could find through google was from Feb. 2017 and it linked back here.