ubuntu中一个非常有用的search命令:apt-cache search

in #cn-programming6 years ago

大家不知有没有这种体验,ubuntu虽然好用,但是教程经常就失去时效了。

比方说我今天要开启apache的curl支持,教程上一般都是这么写的:

sudo apt-get install php5-curl

本来也不是什么大事,但现在php长到7了,这个还好用吧,先试试。

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php5-curl

果然不行,换7呗,也是同样的答案。这下。。。就郁闷了。

现在给大家推荐一个命令:

apt-cache search curl | grep php

返回:

php-curl - CURL module for PHP [default]
php7.0-curl - CURL module for PHP
php-http-request2 - Provides an easy way to perform HTTP requests
php-picofeed - Modern library to handle RSS/Atom feeds

明白了,如果用之前的教程就应该用:

apt-get install php7.0-curl

当然也可以使用:

apt-get install php-curl


ubuntu是越用越好用,windows是越用越难用,现在感觉要慢慢转向ubuntu了。

Coin Marketplace

STEEM 0.29
TRX 0.12
JST 0.033
BTC 70586.26
ETH 3763.77
USDT 1.00
SBD 3.79