<p>You have it installed already. That's why it's saying you have the requirements met and don't need to download it again.</p>

CC BY-SA 3.0
2016-08-24T21:16:18.030Z
Thank you very much ! I am guessing something else is wrong too. I have updated my question to explain.
Sven Williamson
CC BY-SA 3.0
2016-08-24T21:18:56.613Z
I think I know why. Did you use "bitcoin" instead of "bitcoin-php"?
Whyte the Weeabear
CC BY-SA 3.0
2016-08-24T21:22:03.040Z
I typed `composer require bitwasp/bitcoin` to install and the code is exactly as I have stated it. Using the indicated repository. I am on Debian 8.
Sven Williamson
CC BY-SA 3.0
2016-08-24T21:23:45.240Z
Oh, im not familiar with Debian. What php version are you using?
Whyte the Weeabear
CC BY-SA 3.0
2016-08-24T21:25:49.707Z
`PHP 5.6.24. Zend Engine v2.6.0 with Zend OPcache v7.0.6-dev`. This is pure PHP, run as a script (no browser involed), if this matters.
Sven Williamson
CC BY-SA 3.0
2016-08-24T21:05:17.957Z
2016-08-24T21:05:17.957Z
Whyte the Weeabear
<p>I am attempting to set up the PHP bitwasp library from the github repository:</p>

<p><a href="https://github.com/Bit-Wasp/bitcoin-php" rel="nofollow">https://github.com/Bit-Wasp/bitcoin-php</a></p>

<p>The installing instructions suggest I simply execute:</p>

<p><code>$ composer require bitwasp/bitcoin</code></p>

<p>I do have <code>composer</code> installed but I am getting the following error message:</p>

<p><code>Problem 1
    - Installation request for bitwasp/bitcoin dev-master -&gt; satisfiable by bitwasp/bitcoin[dev-master].
    - Can only install one of: bitwasp/bitcoin[v0.0.29.1, dev-master].
    - Installation request for bitwasp/bitcoin v0.0.29.1 -&gt; satisfiable by bitwasp/bitcoin[v0.0.29.1].</code></p>

<p>I do not practice PHP full time so I lack the experience of installing packages in that language and using <code>composer</code>. I would be grateful if someone could point me in the right direction.</p>

<p><strong>EDIT</strong>
The suggestion has been made that the package is already installed. However, the following code sample which I got from another thread:</p>

<pre><code>&lt;?php
// failing to install bitwasp
use BitWasp\Bitcoin\Bitcoin;
use BitWasp\Bitcoin\Address;
use BitWasp\Bitcoin\Key\PrivateKeyFactory;

$network = Bitcoin::getNetwork();

$privateKey = PrivateKeyFactory::create(true);
$publicKey = $privateKey-&gt;getPublicKey();
$address = $publicKey-&gt;getAddress();

?&gt;
</code></pre>

<p>is giving me <code>PHP Fatal error:  Class 'BitWasp\Bitcoin\Bitcoin' not found</code>.</p>

CC BY-SA 3.0
2016-08-25T20:25:43.640Z
Did you include the vendor/autoload.php file? It's missing from your snippet, so as suggested below, it might already be on your system.
karimkorun
CC BY-SA 3.0
2016-08-25T21:49:25.387Z
You have made me very happy !!! First of all I had to type `composer install` instead of `composer require bitswap/bitcoin` and this triggered a proper installation, and in particular this created a `vendor` directory with an `autoload.php` file in it. Then I created a symbolic link from my working directory to this `vendor` directory. Then I added the line `require 'vendor/autoload.php';` in my snippet as you suggested. And voila the thing ran :) Thank you very much !!. If you want to explain the answer for the record (better than I can do, I am no PHP specialist) I will gladly upvote it.  .
Sven Williamson
CC BY-SA 3.0
2018-01-14T22:27:06.030Z
Oh, please be careful :P someone published bitswap/bitcoin on composer and I'm not sure if they're typo-squatting! If you can, @Sven could you update your comment if this wasn't what you meant?
karimkorun
CC BY-SA 4.0
2018-11-01T10:10:08.450Z
`require 'vendor/autoload.php'; `For those having similar issues.
Sydwell
<php><bitwasp>
Installing PHP bitwasp bitcoin library
Sven Williamson
# Installing PHP bitwasp bitcoin library

(Asked by: username_0 on 2016-08-24)

I am attempting to set up the PHP bitwasp library from the github repository:
https://github.com/Bit-Wasp/bitcoin-php
The installing instructions suggest I simply execute:
$ composer require bitwasp/bitcoin
I do have composer installed but I am getting the following error message:
Problem 1
    - Installation request for bitwasp/bitcoin dev-master -> satisfiable by bitwasp/bitcoin[dev-master].
    - Can only install one of: bitwasp/bitcoin[v0.0.29.1, dev-master].
    - Installation request for bitwasp/bitcoin v0.0.29.1 -> satisfiable by bitwasp/bitcoin[v0.0.29.1].
I do not practice PHP full time so I lack the experience of installing packages in that language and using composer. I would be grateful if someone could point me in the right direction.
EDIT
The suggestion has been made that the package is already installed. However, the following code sample which I got from another thread:
getPublicKey();
$address = $publicKey->getAddress();

?>

is giving me PHP Fatal error:  Class 'BitWasp\Bitcoin\Bitcoin' not found.

**Tags:** php, bitwasp

> **Comments:**
> **username_1**: Did you include the vendor/autoload.php file? It's missing from your snippet, so as suggested below, it might already be on your system.  
> **username_0**: You have made me very happy !!! First of all I had to type `composer install` instead of `composer require bitswap/bitcoin` and this triggered a proper installation, and in particular this created a `vendor` directory with an `autoload.php` file in it. Then I created a symbolic link from my working directory to this `vendor` directory. Then I added the line `require 'vendor/autoload.php';` in my snippet as you suggested. And voila the thing ran :) Thank you very much !!. If you want to explain the answer for the record (better than I can do, I am no PHP specialist) I will gladly upvote it.  .  
> **username_1**: Oh, please be careful :P someone published bitswap/bitcoin on composer and I'm not sure if they're typo-squatting! If you can, @Sven could you update your comment if this wasn't what you meant?  
> **username_2**: `require 'vendor/autoload.php'; `For those having similar issues.  

---

## 1 answers

### Answer by username_3 on 2016-08-24. Score: 1

You have it installed already. That's why it's saying you have the requirements met and don't need to download it again.

> **Comments:**
> **username_0**: Thank you very much ! I am guessing something else is wrong too. I have updated my question to explain.  
> **username_3**: I think I know why. Did you use "bitcoin" instead of "bitcoin-php"?  
> **username_0**: I typed `composer require bitwasp/bitcoin` to install and the code is exactly as I have stated it. Using the indicated repository. I am on Debian 8.  
> **username_3**: Oh, im not familiar with Debian. What php version are you using?  
> **username_0**: `PHP 5.6.24. Zend Engine v2.6.0 with Zend OPcache v7.0.6-dev`. This is pure PHP, run as a script (no browser involed), if this matters.  

---

