joeldg / bowhead

PHP trading bot framework
Apache License 2.0
801 stars 288 forks source link

Problems with pecl/trader #66

Closed BrotherHelmer closed 6 years ago

BrotherHelmer commented 6 years ago

I seem to be having some issues with the pecl/trader on Ubuntu running on EC2.

When I get to the point: php artisan bowhead:example_usage

I am greeted with:

See the tutorial:
https://medium.com/@joeldg/an-advanced-tutorial-a-new-crypto-currency-trading-bot-boilerplate-framework-e777733607a

You are missing the required Trader extension http://php.net/manual/en/book.trader.php
TO INSTALL:
curl -O http://pear.php.net/go-pear.phar
sudo php -d detect_unicode=0 go-pear.phar
sudo pecl install trader

Getting to this: sudo pecl install trader

Gives me the dreaded XML Extension not found error, but going SUDO SU and then running this command first: sed -i "$ s|\-n||g" /usr/bin/pecl

and then running sudo pecl install trader

again gives me:

ubuntu@ip-:~/bowhead$ sudo su
root@ip-:/home/ubuntu/bowhead# sed -i "$ s|\-n||g" /usr/bin/pecl
root@ip-:/home/ubuntu/bowhead# sudo pecl install trader
pecl/trader is already installed and is the same as the released version 0.4.0
install failed

I appear to be stuck, I am by no means an Ubuntu expert so any help here would be greatly appreciated.

vitoo commented 6 years ago

add this file https://github.com/joeldg/bowhead/blob/master/docker/resources/etc/php/7.1/mods-available/trader.ini

to /etc/php/7.1/mods-available/trader.ini

BrotherHelmer commented 6 years ago

Thank you very much. That file was indeed missing, but the problem persists.

vitoo commented 6 years ago

Can you try the docker way ?

BrotherHelmer commented 6 years ago

To be honest that's the first thing I did, but since I never used docker I failed spectacularly to do this on windows.

I will try on AWS then.

BrotherHelmer commented 6 years ago

Okay that was so much easier to setup via docker in AWS. There is some getting used too and I do see some weird errors but I'll get them ironed out. Thanks Vitoo!