ubuntu 16.04和18.04安裝最新版cmake

參考

https://apt.kitware.com/

Kitware APT Repository

This is Kitware, Inc.'s third-party APT repository, which we use for hosting our own Ubuntu packages, such as CMake.

We currently support Ubuntu 16.04, 18.04, and 20.04 on our

repository. The 16.04 and 18.04 repositories support x86 (32-bit and

64-bit), and the 20.04 repository supports x86 (32-bit and 64-bit) and

ARM (32-bit and 64-bit).

To add the repository to your installation, run thekitware-archive.shscript, or do the following in order:

1.If you are using aminimalUbuntu image or a Docker image, you may need to install the following packages:

For Ubuntu Bionic Beaver (18.04) and newer:

sudo apt-get update

sudo apt-get install gpg wget

For Ubuntu Xenial Xerus (16.04):

sudo apt-get update

sudo apt-get install apt-transport-https wget

2.Obtain a copy of our signing key:

wget -O -?https://apt.kitware.com/keys/kitware-archive-latest.asc?2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null

3.Add the repository to your sources list and update.

For Ubuntu Focal Fossa (20.04):

echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null

sudo apt-get update

For Ubuntu Bionic Beaver (18.04):

echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null

sudo apt-get update

For Ubuntu Xenial Xerus (16.04):

echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ xenial main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null

sudo apt-get update

4.Install thekitware-archive-keyringpackage to ensure that your keyring stays up to date as we rotate our keys:

sudo rm /usr/share/keyrings/kitware-archive-keyring.gpg

sudo apt-get install kitware-archive-keyring

5.As an optional step, if you would like to subscribe to release

candidates in addition to production releases, you can add our release

candidate repository to your sources.

For Ubuntu Focal Fossa (20.04):

echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal-rc main' | sudo tee -a /etc/apt/sources.list.d/kitware.list >/dev/null

sudo apt-get update

For Ubuntu Bionic Beaver (18.04):

echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic-rc main' | sudo tee -a /etc/apt/sources.list.d/kitware.list >/dev/null

sudo apt-get update

For Ubuntu Xenial Xerus (16.04):

echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ xenial-rc main' | sudo tee -a /etc/apt/sources.list.d/kitware.list >/dev/null

sudo apt-get update

Note that if you add the release candidate repository,you will still need to add the main repository as well, as the release candidate repository does not provide production releases on its own.

Now you can install any package from our APT repository. As an example, try installing thecmakepackage:

sudo apt-get install cmake

For all questions and concerns, please contactdebian@kitware.com.

Copyright ? 2018-2021 Kitware, Inc. |https://www.kitware.com/

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子幽纷,更是在濱河造成了極大的恐慌,老刑警劉巖寓搬,帶你破解...
    沈念sama閱讀 211,743評論 6 492
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件采驻,死亡現(xiàn)場離奇詭異岩喷,居然都是意外死亡售碳,警方通過查閱死者的電腦和手機强重,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 90,296評論 3 385
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來贸人,“玉大人间景,你說我怎么就攤上這事【逆ⅲ” “怎么了拱燃?”我有些...
    開封第一講書人閱讀 157,285評論 0 348
  • 文/不壞的土叔 我叫張陵秉溉,是天一觀的道長力惯。 經(jīng)常有香客問我,道長召嘶,這世上最難降的妖魔是什么父晶? 我笑而不...
    開封第一講書人閱讀 56,485評論 1 283
  • 正文 為了忘掉前任,我火速辦了婚禮弄跌,結(jié)果婚禮上甲喝,老公的妹妹穿的比我還像新娘。我一直安慰自己铛只,他們只是感情好埠胖,可當(dāng)我...
    茶點故事閱讀 65,581評論 6 386
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著淳玩,像睡著了一般直撤。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上蜕着,一...
    開封第一講書人閱讀 49,821評論 1 290
  • 那天谋竖,我揣著相機與錄音,去河邊找鬼承匣。 笑死蓖乘,一個胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的韧骗。 我是一名探鬼主播嘉抒,決...
    沈念sama閱讀 38,960評論 3 408
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼袍暴!你這毒婦竟也來了些侍?” 一聲冷哼從身側(cè)響起握牧,我...
    開封第一講書人閱讀 37,719評論 0 266
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎娩梨,沒想到半個月后沿腰,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 44,186評論 1 303
  • 正文 獨居荒郊野嶺守林人離奇死亡狈定,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 36,516評論 2 327
  • 正文 我和宋清朗相戀三年颂龙,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片纽什。...
    茶點故事閱讀 38,650評論 1 340
  • 序言:一個原本活蹦亂跳的男人離奇死亡措嵌,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出芦缰,到底是詐尸還是另有隱情企巢,我是刑警寧澤,帶...
    沈念sama閱讀 34,329評論 4 330
  • 正文 年R本政府宣布让蕾,位于F島的核電站浪规,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏探孝。R本人自食惡果不足惜笋婿,卻給世界環(huán)境...
    茶點故事閱讀 39,936評論 3 313
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望顿颅。 院中可真熱鬧缸濒,春花似錦、人聲如沸粱腻。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,757評論 0 21
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽绍些。三九已至捞慌,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間遇革,已是汗流浹背卿闹。 一陣腳步聲響...
    開封第一講書人閱讀 31,991評論 1 266
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留萝快,地道東北人锻霎。 一個月前我還...
    沈念sama閱讀 46,370評論 2 360
  • 正文 我出身青樓,卻偏偏與公主長得像揪漩,于是被迫代替她去往敵國和親旋恼。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 43,527評論 2 349

推薦閱讀更多精彩內(nèi)容