Author Topic: error: The PEAR repository has been removed from Composer 2.0  (Read 436 times)

Offline walnut1

  • Newbie
  • *
  • Posts: 2
error: The PEAR repository has been removed from Composer 2.0
« on: October 20, 2021, 12:10:06 PM »
I upgraded from 1.4.11 to 1.5.0 today and at the end of the install the scripts completes with this reminder as usual:

NOTICE: Update dependencies by running `php composer.phar update --no-dev`

Ok, I run `php composer.phar update --no-dev` and get the following error:

  [RuntimeException]
  The PEAR repository has been removed from Composer 2.0


This I got from simply following the instructions, but I do not have a strong linux background. Can someone help me out or point me in the right direction here?

Offline alec

  • Hero Member
  • *****
  • Posts: 1,299
Re: error: The PEAR repository has been removed from Composer 2.0
« Reply #1 on: October 20, 2021, 12:37:51 PM »
In composer.json the "repositories" item should look like this:
Code: [Select]
    "repositories": [
        {
            "type": "composer",
            "url": "https://plugins.roundcube.net"
        }
    ],

Offline henrythemouse

  • Newbie
  • *
  • Posts: 2
Re: error: The PEAR repository has been removed from Composer 2.0
« Reply #2 on: October 22, 2021, 07:56:10 PM »
I had the same problem. Turned out that my 4.x installation had an old composer.json file. A new one was distributed with the installation but not enabled, named: composer.json-dist. I backed up my old file and copied the new file to composer.json. Then the command worked (although, I still have a couple of errors).

Offline walnut1

  • Newbie
  • *
  • Posts: 2
Re: error: The PEAR repository has been removed from Composer 2.0
« Reply #3 on: November 22, 2021, 03:34:35 PM »
In composer.json the "repositories" item should look like this:
Code: [Select]
    "repositories": [
        {
            "type": "composer",
            "url": "https://plugins.roundcube.net"
        }
    ],


Thanks Alec, this helped me get a bit further.

`php composer.phar update --no-dev`
   worked after your recommendation, installed and did many things.

Now when I go to my Roundcube installation I get this error:

Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.1.0".

Here is the output of php -V on my system:

PHP 7.3.31-1~deb10u1 (cli) (built: Oct 24 2021 15:18:08) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.31, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.31-1~deb10u1, Copyright (c) 1999-2018, by Zend Technologies

 

Help! What am I missing here?






Offline alec

  • Hero Member
  • *****
  • Posts: 1,299
Re: error: The PEAR repository has been removed from Composer 2.0
« Reply #4 on: November 23, 2021, 04:32:57 AM »
You may have multiple php versions in the system. The one configured for use with the http server might be older.