Otu esi etinye asụsụ mmemme Swift na Fedora 35

Swift, nke a na-akpọkarị "Ebumnobi-C, enweghị C," bụ asụsụ mmemme mepere emepe mebere ma na-echekwa ya AppleSwift bụ izugbe-nzube asụsụ mmemme wuru site na iji nchekwa ọgbara ọhụrụ, arụmọrụ yana ụkpụrụ imewe sọftụwia. Ihe oru Swift bu n'obi imepụta asusu kacha mma maka mmemme sistemu na ngwa mkpanaka na desktọpụ, na-abawanye ruo ọrụ igwe ojii.

N'ime nkuzi a, ị ga-amụta Otu esi etinye Asụsụ Mmemme Swift na sistemụ Fedora 35 gị.

Prerequisites

  • OS akwadoro: Linux Fedora 35
  • Akaụntụ onye ọrụ: Akaụntụ onye ọrụ nwere sudo ma ọ bụ ohere mgbọrọgwụ.

Melite Sistemụ Ọrụ

Melite gi Fedora Sistemụ arụmọrụ iji hụ na ngwugwu niile dị adị adịla ugbu a:

sudo dnf upgrade --refresh -y

Nkuzi a ga-eji ya sudo iwu na na-eche na ị nwere ọnọdụ sudo.

Iji nyochaa ọkwa sudo na akaụntụ gị:

sudo whoami

Ihe atụ na-egosi ọkwa sudo:

[joshua@fedora ~]$ sudo whoami
root

Ka ịtọlite ​​akaụntụ sudo dị adị ma ọ bụ ọhụrụ, gaa na nkuzi anyị na Na-agbakwunye onye ọrụ na Sudoers na Fedora.

Iji mgbọrọgwụ akaụntụ, jiri iwu na-esonụ na paswọọdụ mgbọrọgwụ banye.

su

Advertisement


Wụnye Asụsụ Mmemme Swift

Site na ndabara, Swift dị na ebe nchekwa Fedora. Nyere Fedora bụ ntọhapụ ọnwa isii ọ fọrọ nke nta ka ọ bụrụ mgbe niile nwere ụdị Swift kachasị ọhụrụ dị ma e jiri ya tụnyere nkesa ndị ọzọ ebe ọ bụ ihe ochie ma ọ bụ na-adịghị adị ma ọlị, na-eme ka ntinye ahụ bụrụ usoro ngwa ngwa.

Nke mbụ, tinye Swift na ya dnf tinye iwu dị ka n'okpuru.

sudo install swift-lang

Ihe atụ mmepụta:

Otu esi etinye asụsụ mmemme Swift na Fedora 35

Ụdị Y, wee pịa Tinye igodo ịga n'ihu na mezue nrụnye.

Iji nyochaa nrụnye Swift, jiri iwu a lelee ihe nrụpụta na ụdị.

swift --version

Ihe atụ mmepụta:

Swift version 5.5 (swift-5.5-RELEASE)
Target: x86_64-unknown-linux-gnu

Jikọọ na Swift REPL

Iji jikọọ na Swift Enwere ike nweta REPLL (Gụọ Eval Print Loop) site na iji iwu a:

swift

Ị nwere ike dee nke ọma Okwu ngwa ngwa n'ọnụ ọnụ a wee hụ ka a na-enyocha ha, ị nwekwara ike iji ụlọ akwụkwọ C ọkọlọtọ site na ibubata GNU C Libary.

N'okpuru bụ ụfọdụ isi atụ nke Swift n'ọrụ:

let name = "Joshua James"
import Glibc // imports GNU C Library
var ln = random () % 100
print(“Thank You LinuxCapable.com for learning how to Install Swift on Fedora 35”)

Ọmụmaatụ n'ọnụ ọnụ:

Otu esi etinye asụsụ mmemme Swift na Fedora 35

I wepu the Swift Terminal, jiri iwu a:

:q

Advertisement


Otu esi emelite Swift

Maka mmelite na Swift, jiri ọkọlọtọ ume ọhụrụ.

sudo dnf upgrade --refresh

Nke a ga-emelitekwa ngwungwu ndị ọzọ emechiela anya na sistemụ gị, nke a dịkwa mma ka idobe sistemu ọrụ nchekwa nchekwa.

Otu esi ewepu (wepu) ngwa ngwa

Iwepụ asụsụ ahụ dị mfe maka ndị ọrụ na-achọkwaghị Swift na sistemụ Fedora ha kemgbe etinyere ya site na iji njikwa ngwugwu dnf.

Na njedebe gị, mebie iwu a:

sudo dnf autoremove swift-lang

Ihe atụ mmepụta:

Otu esi etinye asụsụ mmemme Swift na Fedora 35

Ụdị Y, wee pịa Tinye igodo ịga n'ihu ma mezue mwepụ ahụ.


Advertisement


Okwu na mmechi

N'ime nkuzi, ị mụtala otu esi etinye ya Swift asụsụ mmemme site na nbudata na ibubata igodo PGP, wepụ bash na ụzọ achọrọ, yana iwu ndị bụ isi iji nweta mmetụta maka Ọnụ ọnụ ngwa ngwa.

Ahapụ a Comment