---
title: "pear PHPUnit 错误处理"
author: "vtrtbb"
date: "2016-08-29T19:01:41Z"
tags: []
categories: ["编程语言"]
slug: "pear-phpunit"
draft: false
lastmod: "2016-08-29T19:01:41Z"
id: 2321510
url: "https://vtrtbb.iteye.com/blog/2321510"
---

```
在执行 pear install pear.phpunit.de/PHPUnit 时候如过出现以下错误：
Attempting to discover channel "phpunit"...
Attempting fallback to https instead of http on channel "phpunit"...
unknown channel "phpunit" in "phpunit/PHPUnit"
invalid package name/package file "phpunit/PHPUnit"
install failed

那就换成

pear install pear.php.net/PHPUnit 试试
WARNING: "pear/PHPUnit" is deprecated in favor of "channel://pear.phpunit.de/PHP
Unit"
Did not download dependencies: pear/PHP_Compat, use --alldeps or --onlyreqdeps t
o download automatically
pear/PHPUnit can optionally use package "pear/PHP_Compat"
downloading PHPUnit-1.3.2.tgz ...
Starting to download PHPUnit-1.3.2.tgz (20,913 bytes)
........done: 20,913 bytes
install ok: channel://pear.php.net/PHPUnit-1.3.2
```