Riley Ge avatar

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

rileyge

Published: 26 Feb 2018 › Updated: 26 Feb 2018ubuntu中一个非常有用的search命令:apt-cache search

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

大家不知有没有这种体验,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了。

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

Written by

I am an engineer, a programer, a man love my wife very much.

Read more #cn-programming posts


Best Posts From Riley Ge

We have not curated any of rileyge's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From Riley Ge