Search code examples
phpapigen

When I try to run ApiGen I get a PHP Warning: require(Texy.php): failed to open stream: No such file or directory


I installed ApiGen successfully using the following commands:

pear channel-discover pear.apigen.org
pear channel-discover pear.nette.org
pear channel-discover pear.texy.info
pear channel-discover pear.kukulich.cz
pear channel-discover pear.andrewsville.cz

pear install apigen/ApiGen

Then I ran:

apigen -s /home/first.last/path/to/source/directory -d /home/first.last/path/to/destination/directory/

Only to get the following error:

PHP Warning:  require(Texy.php): failed to open stream: No such file or directory in /usr/bin/apigen on line 48
PHP Stack trace:
PHP   1. {main}() /usr/bin/apigen:0
PHP   2. class_exists('Texy') /usr/bin/apigen:64
PHP   3. spl_autoload_call('Texy') /usr/bin/apigen:64
PHP   4. ApiGen\{closure}($class = 'Texy') /usr/bin/apigen:0
PHP Fatal error:  require(): Failed opening required 'Texy.php' (include_path='.:/usr/share/pear:/usr/share/php') in /usr/bin/apigen on line 48
PHP Stack trace:
PHP   1. {main}() /usr/bin/apigen:0
PHP   2. class_exists('Texy') /usr/bin/apigen:64
PHP   3. spl_autoload_call('Texy') /usr/bin/apigen:64
PHP   4. ApiGen\{closure}($class = 'Texy') /usr/bin/apigen:0

When i ran

locate Texy.php

I got: (so clearly it's there)

/usr/share/pear/FSHL/Lexer/Texy.php
/usr/share/pear/FSHL/Lexer/Cache/Texy.php
/usr/share/pear/texy/src/Texy/Texy.php

Solution

  • This issue has been filed in apigen github. It's an issue of a wrong path. You will find answers how to change the path at the github link