Bug 1049883 - /usr/bin/pecl: line 2: /usr/bin/php: No such file or directory
Summary: /usr/bin/pecl: line 2: /usr/bin/php: No such file or directory
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: php-pear
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Remi Collet
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1193612
TreeView+ depends on / blocked
 
Reported: 2014-01-08 12:27 UTC by Kamil Páral
Modified: 2015-02-27 09:25 UTC (History)
13 users (show)

Fixed In Version: php-pecl-jsonc-1.3.7-1.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1193612 (view as bug list)
Environment:
Last Closed: 2015-02-27 09:25:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Kamil Páral 2014-01-08 12:27:35 UTC
Description of problem:
I received an error while removing php-pecl-jsonc package:

> $ yum history undo last
> Loaded plugins: changelog, langpacks, refresh-packagekit
> Undoing transaction 587, from Wed Jan  8 13:21:31 2014
>     Install     phoronix-test-suite-4.8.6-1.fc20.noarch @updates
>     Dep-Install php-cli-5.5.7-1.fc20.x86_64             @updates
>     Dep-Install php-common-5.5.7-1.fc20.x86_64          @updates
>     Dep-Install php-fpdf-1.6-9.fc20.noarch              @fedora
>     Dep-Install php-gd-5.5.7-1.fc20.x86_64              @updates
>     Dep-Install php-pear-1:1.9.4-23.fc20.noarch         @fedora
>     Dep-Install php-pecl-jsonc-1.3.3-1.fc20.x86_64      @updates
>     Dep-Install php-process-5.5.7-1.fc20.x86_64         @updates
>     Dep-Install php-xml-5.5.7-1.fc20.x86_64             @updates
> Resolving Dependencies
> --> Running transaction check
> ---> Package phoronix-test-suite.noarch 0:4.8.6-1.fc20 will be erased
> ---> Package php-cli.x86_64 0:5.5.7-1.fc20 will be erased
> ---> Package php-common.x86_64 0:5.5.7-1.fc20 will be erased
> ---> Package php-fpdf.noarch 0:1.6-9.fc20 will be erased
> ---> Package php-gd.x86_64 0:5.5.7-1.fc20 will be erased
> ---> Package php-pear.noarch 1:1.9.4-23.fc20 will be erased
> ---> Package php-pecl-jsonc.x86_64 0:1.3.3-1.fc20 will be erased
> ---> Package php-process.x86_64 0:5.5.7-1.fc20 will be erased
> ---> Package php-xml.x86_64 0:5.5.7-1.fc20 will be erased
> --> Finished Dependency Resolution
> --> Finding unneeded leftover dependencies
> Found and removing 0 unneeded dependencies
> 
> Dependencies Resolved
> 
> =========================================================================================================================================================================================
>  Package                                            Arch                                  Version                                          Repository                               Size
> =========================================================================================================================================================================================
> Removing:
>  phoronix-test-suite                                noarch                                4.8.6-1.fc20                                     @updates                                2.1 M
>  php-cli                                            x86_64                                5.5.7-1.fc20                                     @updates                                8.4 M
>  php-common                                         x86_64                                5.5.7-1.fc20                                     @updates                                7.4 M
>  php-fpdf                                           noarch                                1.6-9.fc20                                       @fedora                                 173 k
>  php-gd                                             x86_64                                5.5.7-1.fc20                                     @updates                                240 k
>  php-pear                                           noarch                                1:1.9.4-23.fc20                                  @fedora                                 2.2 M
>  php-pecl-jsonc                                     x86_64                                1.3.3-1.fc20                                     @updates                                100 k
>  php-process                                        x86_64                                5.5.7-1.fc20                                     @updates                                187 k
>  php-xml                                            x86_64                                5.5.7-1.fc20                                     @updates                                877 k
> 
> Transaction Summary
> =========================================================================================================================================================================================
> Remove  9 Packages
> 
> Installed size: 22 M
> Is this ok [y/N]: y
> Downloading packages:
> Running transaction check
> Running transaction test
> Transaction test succeeded
> Running transaction
>   Erasing    : phoronix-test-suite-4.8.6-1.fc20.noarch                                                                                                                               1/9 
>   Erasing    : php-fpdf-1.6-9.fc20.noarch                                                                                                                                            2/9 
>   Erasing    : php-gd-5.5.7-1.fc20.x86_64                                                                                                                                            3/9 
>   Erasing    : php-cli-5.5.7-1.fc20.x86_64                                                                                                                                           4/9 
>   Erasing    : php-process-5.5.7-1.fc20.x86_64                                                                                                                                       5/9 
>   Erasing    : php-xml-5.5.7-1.fc20.x86_64                                                                                                                                           6/9 
>   Erasing    : php-common-5.5.7-1.fc20.x86_64                                                                                                                                        7/9 
>   Erasing    : php-pecl-jsonc-1.3.3-1.fc20.x86_64                                                                                                                                    8/9 
> /usr/bin/pecl: line 2: /usr/bin/php: No such file or directory
>   Erasing    : 1:php-pear-1.9.4-23.fc20.noarch                                                                                                                                       9/9 
> warning: /etc/pear.conf saved as /etc/pear.conf.rpmsave
>   Verifying  : php-gd-5.5.7-1.fc20.x86_64                                                                                                                                            1/9 
>   Verifying  : php-common-5.5.7-1.fc20.x86_64                                                                                                                                        2/9 
>   Verifying  : php-fpdf-1.6-9.fc20.noarch                                                                                                                                            3/9 
>   Verifying  : php-pecl-jsonc-1.3.3-1.fc20.x86_64                                                                                                                                    4/9 
>   Verifying  : 1:php-pear-1.9.4-23.fc20.noarch                                                                                                                                       5/9 
>   Verifying  : php-process-5.5.7-1.fc20.x86_64                                                                                                                                       6/9 
>   Verifying  : php-xml-5.5.7-1.fc20.x86_64                                                                                                                                           7/9 
>   Verifying  : phoronix-test-suite-4.8.6-1.fc20.noarch                                                                                                                               8/9 
>   Verifying  : php-cli-5.5.7-1.fc20.x86_64                                                                                                                                           9/9 
> 
> Removed:
>   phoronix-test-suite.noarch 0:4.8.6-1.fc20   php-cli.x86_64 0:5.5.7-1.fc20          php-common.x86_64 0:5.5.7-1.fc20    php-fpdf.noarch 0:1.6-9.fc20    php-gd.x86_64 0:5.5.7-1.fc20  
>   php-pear.noarch 1:1.9.4-23.fc20             php-pecl-jsonc.x86_64 0:1.3.3-1.fc20   php-process.x86_64 0:5.5.7-1.fc20   php-xml.x86_64 0:5.5.7-1.fc20  
> 
> Complete!

Version-Release number of selected component (if applicable):
php-pecl-jsonc.x86_64 0:1.3.3-1.fc20

How reproducible:
always (probably just if php not installed before)

Steps to Reproduce:
1. install php-pecl-jsonc
2. remove php-pecl-jsonc

Comment 1 Remi Collet 2014-01-08 12:34:16 UTC
This is a old known bug in yum remove order.

in php-pecl-jsonc
Requires(postun): %{__pecl}

in php-pear (which provides pecl command)
Requires:  php-cli

But yum doesn't respect dependencies for remove order.
Nothing we can fix from php packages.

So moving to yum.

Comment 2 Zdeněk Pavlas 2014-01-08 12:48:58 UTC
I believe RPM does the transaction ordering, and does it properly most of the time.  Isn't there a dependency cycle?

Comment 3 Remi Collet 2014-01-08 13:11:32 UTC
Yes there is a circular dep...
php-pecl-jsonc => php-pear => php-cli => php-common => php-pecl-jsonc.

So probably something we cannot fix.

Comment 4 Panu Matilainen 2014-01-08 13:29:14 UTC
Yup, the problem is the thick dependency loops in this package set:

[root@localhost php-foo]# rpm -evh --deploops php-pear php-cli php-common php-process php-pecl-jsonc php-xml
warning: 1 Strongly Connected Components
warning: SCC #1: 6 members (0 external dependencies)
warning:        php-pear-1:1.9.4-23.fc20.noarch
warning:                => php-pecl-jsonc-1.3.3-1.fc20.x86_64
warning:        php-common-5.5.7-1.fc20.x86_64
warning:                -> php-xml-5.5.7-1.fc20.x86_64
warning:                -> php-pecl-jsonc-1.3.3-1.fc20.x86_64
warning:                -> php-process-5.5.7-1.fc20.x86_64
warning:                -> php-cli-5.5.7-1.fc20.x86_64
warning:                -> php-pear-1:1.9.4-23.fc20.noarch
warning:                -> php-pear-1:1.9.4-23.fc20.noarch
warning:                -> php-pear-1:1.9.4-23.fc20.noarch
warning:                -> php-pear-1:1.9.4-23.fc20.noarch
warning:        php-pecl-jsonc-1.3.3-1.fc20.x86_64
warning:                -> php-common-5.5.7-1.fc20.x86_64
warning:        php-xml-5.5.7-1.fc20.x86_64
warning:                -> php-pear-1:1.9.4-23.fc20.noarch
warning:        php-process-5.5.7-1.fc20.x86_64
warning:                -> php-pear-1:1.9.4-23.fc20.noarch
warning:        php-cli-5.5.7-1.fc20.x86_64
warning:                -> php-pear-1:1.9.4-23.fc20.noarch
Preparing...                          ################################# [100%]
Cleaning up / removing...
   1:php-cli-5.5.7-1.fc20             ################################# [ 17%]
   2:php-process-5.5.7-1.fc20         ################################# [ 33%]
   3:php-xml-5.5.7-1.fc20             ################################# [ 50%]
   4:php-common-5.5.7-1.fc20          ################################# [ 67%]
   5:php-pecl-jsonc-1.3.3-1.fc20      ################################# [ 83%]
/usr/bin/pecl: line 2: /usr/bin/php: No such file or directory
   6:php-pear-1:1.9.4-23.fc20         ################################# [100%]
warning: /etc/pear.conf saved as /etc/pear.conf.rpmsave
[root@localhost php-foo]#

For example php-cli requires php-pear and php-pear requires php-cli. Its (obviously) not possible to satisfy the order both ways, so rpm is forced to cut the loops the best it can, using pre/postun etc dependency markers as hints to try and minimize the breakage. Its not always "right" because there simply is no correct way to order a loop.

The best option is to get rid of the loops somehow. Short of that, you can try putting an additional "Requires(postun): php-cli" to php-pear to hint rpm that its better to remove php-pear before php-cli (php-cli doesn't have any scripts so there are no other dependencies to worry about)

It might be possible to improve rpm's loop-cutting heuristics by using additional measures such as script presence, but heuristics will fail sooner or later.

Back to php...

Comment 5 Cristian Ciupitu 2014-04-21 16:21:42 UTC
It happened to me too while running `yum history undo last':

Running transaction
  Erasing    : wordpress-3.8.2-1.fc20.noarch                1/18
  Erasing    : php-simplepie-1.3.1-5.fc20.noarch            2/18
  Erasing    : php-IDNA_Convert-0.8.0-3.fc20.noarch         3/18
  Erasing    : php-5.5.11-1.fc20.x86_64                     4/18
  Erasing    : php-gd-5.5.11-1.fc20.x86_64                  5/18
  Erasing    : php-pecl-zip-1.12.4-1.fc20.x86_64            6/18
  Erasing    : php-PHPMailer-5.2.6-2.fc20.noarch            7/18
  Erasing    : php-mbstring-5.5.11-1.fc20.x86_64            8/18
  Erasing    : php-enchant-5.5.11-1.fc20.x86_64             9/18
  Erasing    : php-mysqlnd-5.5.11-1.fc20.x86_64            10/18
  Erasing    : php-pdo-5.5.11-1.fc20.x86_64                11/18
  Erasing    : php-cli-5.5.11-1.fc20.x86_64                12/18
  Erasing    : php-process-5.5.11-1.fc20.x86_64            13/18
  Erasing    : php-xml-5.5.11-1.fc20.x86_64                14/18
  Erasing    : php-common-5.5.11-1.fc20.x86_64             15/18
  Erasing    : php-pecl-jsonc-1.3.3-1.fc20.x86_64          16/18
/usr/bin/pecl: line 2: /usr/bin/php: No such file or directory
  Erasing    : 1:php-pear-1.9.4-23.fc20.noarch             17/18
warning: /etc/pear.conf saved as /etc/pear.conf.rpmsave
  Erasing    : t1lib-5.1.2-14.fc20.x86_64                  18/18
  Verifying  : php-xml-5.5.11-1.fc20.x86_64                 1/18
  Verifying  : php-process-5.5.11-1.fc20.x86_64             2/18
  Verifying  : php-cli-5.5.11-1.fc20.x86_64                 3/18
  Verifying  : php-PHPMailer-5.2.6-2.fc20.noarch            4/18
  Verifying  : t1lib-5.1.2-14.fc20.x86_64                   5/18
  Verifying  : php-enchant-5.5.11-1.fc20.x86_64             6/18
  Verifying  : php-pecl-jsonc-1.3.3-1.fc20.x86_64           7/18
  Verifying  : php-mbstring-5.5.11-1.fc20.x86_64            8/18
  Verifying  : wordpress-3.8.2-1.fc20.noarch                9/18
  Verifying  : 1:php-pear-1.9.4-23.fc20.noarch             10/18
  Verifying  : php-pdo-5.5.11-1.fc20.x86_64                11/18
  Verifying  : php-IDNA_Convert-0.8.0-3.fc20.noarch        12/18
  Verifying  : php-5.5.11-1.fc20.x86_64                    13/18
  Verifying  : php-common-5.5.11-1.fc20.x86_64             14/18
  Verifying  : php-simplepie-1.3.1-5.fc20.noarch           15/18
  Verifying  : php-mysqlnd-5.5.11-1.fc20.x86_64            16/18
  Verifying  : php-pecl-zip-1.12.4-1.fc20.x86_64           17/18
  Verifying  : php-gd-5.5.11-1.fc20.x86_64                 18/18

I have yum-3.4.3-137.fc20.noarch and rpm-4.11.2-2.fc20.x86_64.

Comment 6 Fedora Admin XMLRPC Client 2014-07-16 12:03:32 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 7 Fedora Update System 2015-02-18 14:40:16 UTC
php-pecl-jsonc-1.3.7-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/php-pecl-jsonc-1.3.7-1.fc21

Comment 8 Fedora Update System 2015-02-19 02:58:55 UTC
Package php-pecl-jsonc-1.3.7-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing php-pecl-jsonc-1.3.7-1.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-2265/php-pecl-jsonc-1.3.7-1.fc21
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2015-02-27 09:25:25 UTC
php-pecl-jsonc-1.3.7-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.