How to install Swift package via package manager?

后端 未结 4 738
清酒与你
清酒与你 2021-02-12 22:39

I am currently following the document from swift.org to play around with the new Swift Package Manager.

I cloned the demo project from Github and run the following comma

4条回答
  •  名媛妹妹
    2021-02-12 22:54

    You did not add the newly installed swift to your PATH. The instructions for doing that are here.

    On OS X:

    export PATH=/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin:"${PATH}"
    

    On Linux:

    export PATH=/path/to/Swift/usr/bin:"${PATH}"
    

    Then to test it works:

    swift build --version
    

提交回复
热议问题