Macports install mac os

Macports install mac os

If you are using macOS, you should install MacPorts using the macOS package installer unless you do not wish to install it to /opt/local/ , the default MacPorts location, or if you wish to install a pre-release version of MacPorts base. However, if you wish to install multiple copies of MacPorts or install MacPorts on another OS platform, you must install MacPorts from the source code.

2.2.1.В macOS Package Install

The macOS package installer automatically installs MacPorts, sets the shell environment, and runs a selfupdate operation to update the ports tree and MacPorts base with the latest release.

Download the latest MacPorts-2.7.1- . pkg installer from the releases on GitHub. Here are direct links for the latest versions of macOS:

macOS 10.15 Catalina:

macOS 10.14 Mojave:

macOS 10.13 High Sierra:

macOS 10.12 Sierra:

Double-click the downloaded package installer to perform the default “ easy ” install.

After this step you are done already, MacPorts is now installed and your shell environment was set up automatically by the installer. To confirm the installation is working as expected, now try using port in a new terminal window.

In case of problems such as “ command not found ” , make sure that you opened a new terminal window or consult Section 2.5, “MacPorts and the Shell”. Otherwise, please skip the remainder of this chapter and continue with Chapter 3, Using MacPorts in this guide.

2.2.2.В Source Install

If you installed MacPorts using the package installer, skip this section. To install MacPorts from the source code, follow the steps below.

Download and extract the MacPorts 2.7.1 tarball. Either do so using your browser and the Finder, or use the given commands in a terminal window.

Afterwards, perform the commands shown in the terminal window. If you wish to use a path other than /opt/local , follow the instructions for installing multiple copies of MacPorts instead.

Please continue with Section 2.5, “MacPorts and the Shell” to set up your shell environment.

2.2.3.В Git Install

If you installed MacPorts using the package installer, skip this section.

There are times when some may want to run MacPorts from a version newer than the current stable release. Maybe there’s a new feature that you’d like to use, or it fixes an issue you’ve encountered, or you just like to be on the cutting edge. These steps explain how to setup MacPorts for developers, using only Git to keep MacPorts up to date.

Though a distinction is made between pre-release and release versions of MacPorts base, the ports collection supports no such distinction or versioning. The selfupdate command installs the latest ports tree, and updates MacPorts base to the latest released version.

Check out MacPorts source

Pick a location to store a working copy of the MacPorts code. For this example, /opt/mports will be used, but you can put the source anywhere. This example will create /opt/mports/macports-base containing everything needed for MacPorts.

Build and Install MacPorts

MacPorts uses autoconf and makefiles for installation. These commands will build and install MacPorts to /opt/local . You can add —prefix to ./configure to relocate MacPorts to another directory if needed.

(Optional) Configure MacPorts to use port information from Git

This step is useful if you want to do port development. Check out the ports tree from git:

Then open /opt/local/etc/macports/sources.conf in a text editor. The last line should look like this:

Change it to point to the working copy you checked out:

Now MacPorts will look for portfiles in the working copy and use Git instead of rsync to update your ports tree.

You should setup your PATH and other environment options according to Section 2.5, “MacPorts and the Shell”.

2.2.4.В Install Multiple MacPorts Copies

Occasionally a MacPorts developer may wish to install more than one MacPorts instance on the same host. Only one copy of MacPorts may use the default prefix /opt/local , so for additional installations use the option —prefix as shown below. It’s also recommended to change the applications dir using —with-applications-dir to avoid conflicts in /Applications/MacPorts . Use —without-startupitems to automatically set startupitem_install no in the new macports.conf , which is required to avoid conflicts in /Library/LaunchAgents or /Library/LaunchDaemons .

The first command temporarily removes the standard MacPorts binary paths because they must not be present while installing a second instance.

Источник

ChapterВ 2.В Installing MacPorts

This chapter shows you how to install MacPorts and its prerequisites step-by-step. Note that the section about installing Xcode is macOS-specific. If you wish to install MacPorts on another platform, first make sure you have a working C compiler installed, skip ahead to installing MacPorts from source, and continue to the end of the chapter.

Читайте также:  Debian linux password file

2.1.В Install Xcode

Xcode is a package provided by Apple containing compilers, libraries and additional tools required to develop applications for macOS.

Always make sure to install the latest available version of Xcode for your macOS release; using outdated versions of Xcode may cause port install failures. Also note that Xcode is not updated via OS X’s Software Update utility on OS versions prior to 10.6, and is updated via the Mac App Store starting with 10.7.

Follow the instructions for your version of macOS:

2.1.1.В Install Xcode on OS X 10.9 or Later

Download the latest version of Xcode from the Apple developer website or get it using the Mac App Store.

Once you have Xcode installed, open a terminal, run xcode-select —install , and click the Install button to install the required command line developer tools. Don’t worry if you see a message telling you the software cannot be installed because it is not currently available from the Software Update Server. This usually means you already have the latest version installed. You can also get the command line tools from the Apple developer website.

2.1.2.В Install Xcode on OS X 10.7 Lion or OS X 10.8 Mountain Lion

Download the latest version of Xcode from the Apple developer website or get it using the Mac App Store.

2.1.2.1.В Xcode 4.3 and Later

Xcode 4.3 and later do not automatically install the command line tools, but MacPorts requires them. To install them, open the Xcode application, go to the Preferences window, to the Downloads section, and click the Install button next to Command Line Tools. Be sure to return to this window after every Xcode upgrade to ensure that the command line tools are also upgraded.

If you wish to create Installer packages with port pkg , you will also need to install PackageMaker, which is in the “ Auxiliary Tools for Xcode ” package as of Xcode 4.3. The download page for this package can be opened via the Xcode -> Open Developer Tool -> More Developer Tools. menu item. After downloading and mounting the disk image, drag the PackageMaker application to your /Applications directory.

2.1.3.В Install Xcode on Mac OS X 10.6 Snow Leopard

If you are using Mac OS X 10.6, there are two branches of Xcode which could be considered to be the latest, 3.2.x and 4.x. Xcode 4 costs money, but Xcode 3 is still available free of charge. There are two options for downloading it:

Xcode 3.2 — smaller download, but you will need to run Software Update after installing to get the latest version. Note that Apple might at some point discontinue providing these updates via their update servers.

Xcode 3.2.6 and iOS SDK 4.3 — includes the iOS SDK which is not needed for MacPorts.

Both are available from the Apple developer website. You may also be able to install Xcode 3.2 from your Mac OS X 10.6 DVD and then run Software Update to get the latest version.

Ensure that those of the following options that are available in the installer for your version of Xcode are selected:

Источник

The MacPorts Project

The MacPorts Project Official Homepage

The MacPorts Project is an open-source community initiative to design an easy-to-use system for compiling, installing, and upgrading either command-line, X11 or Aqua based open-source software on the Mac operating system. To that end we provide the command-line driven MacPorts software package under a 3-Clause BSD License, and through it easy access to thousands of ports that greatly simplify the task of compiling and installing open-source software on your Mac.

We provide a single software tree that attempts to track the latest release of every software title (port) we distribute, without splitting them into “stable” Vs. “unstable” branches, targeting mainly macOS Mojave v10.14 and later (including macOS Big Sur v11 on both Intel and Apple Silicon). There are thousands of ports in our tree, distributed among different categories, and more are being added on a regular basis.

Getting started

For information on installing MacPorts please see the installation section of this site and explore the myriad of download options we provide and our base system requirements.

If you run into any problems installing and/or using MacPorts we also have many options to help you, depending on how you wish to get get in touch with us. Other important help resources are our online documentation, A.K.A The MacPorts Guide, and our Trac Wiki server & bug tracker.

rd international MacPorts Meeting in Slovenia from 11 th -16 th October. Interested developers and users can follow our wiki page for more information.

Getting involved: Students

A good way for students to get involved is through the Google Summer of Code. GSoC is a program to encourage students’ participation in Open Source development and offers a stipend to work on the project with an organization for three months. MacPorts has been participating in the program since 2007! We shall participate next year as well. You may find past GSoC projects here.

We have a list of ideas with possible tasks for MacPorts and additional information about the process at wiki/SummerOfCode. We are always open to new ideas. Research on the idea, draft an initial proposal and get it reviewed.

Читайте также:  Обновление принудительно устанавливающее windows 10

Getting involved

There are many ways you can get involved with MacPorts and peer users, system administrators & developers alike. Browse over to the “Contact Us” section of our site and:

  • Explore our mailing lists, either if it is for some general user support or to keep on top of the latest MacPorts developments and commits to our software repository.
  • Check out our Support & Development portal for some bug reporting and live tutorials through the integrated Wiki server.
  • Or simply come join us for a friendly IRC chat if you wish for more direct contact with the people behind it all.

If on the other hand you are interested in joining The MacPorts Project in any way, then don’t hesitate to contact the project’s management team, “PortMgr”, to explain your particular interest and present a formal application. We’re always looking for more helping hands that can extend and improve our ports tree and documentation, or take MacPorts itself beyond its current limitations and into new areas of the vast software packaging field. We’re eager to hear from you!

Copyright © 2002–2021, The MacPorts Project. All rights reserved.

Источник

The MacPorts Project

Quickstart

  1. Install Xcode and the Xcode Command Line Tools
  2. Agree to Xcode license in Terminal: sudo xcodebuild -license
  3. Install MacPorts for your version of the Mac operating system:
    • macOS Big Sur v11
    • macOS Catalina v10.15
    • macOS Mojave v10.14
    • Older OS? See here.

Installing MacPorts

MacPorts version 2.7.1 is available in various formats for download and installation (note, if you are upgrading to a new major release of macOS, see the migration info page):

  • “pkg” installers for Big Sur, Catalina, and Mojave, for use with the macOS Installer. This is the simplest installation procedure that most users should follow after meeting the requirements listed below. Installers for legacy platforms High Sierra, Sierra, El Capitan, Yosemite, Mavericks, Mountain Lion, Lion, Snow Leopard, Leopard and Tiger are also available.
  • In source form as either a tar.bz2 package or a tar.gz one for manual compilation, if you intend to customize your installation in any way.
  • Git clone of the unpackaged sources, if you wish to follow MacPorts development.
  • The selfupdate target of the port(1) command, for users who already have MacPorts installed and wish to upgrade to a newer release.

Checksums for our packaged downloads are contained in the corresponding checksums file.

The public key to verify the detached GPG signatures can be found under the attachments section on jmr’s wiki page. (Direct Link).

Please note that in order to install and run MacPorts on macOS, your system must have installations of the following components:

Apple’s Xcode Developer Tools (version 12.2 or later for Big Sur, 11.3 or later for Catalina, 10.0 or later for Mojave, 9.0 or later for High Sierra, 8.0 or later for Sierra, 7.0 or later for El Capitan, 6.1 or later for Yosemite, 5.0.1 or later for Mavericks, 4.4 or later for Mountain Lion, 4.1 or later for Lion, 3.2 or later for Snow Leopard, or 3.1 or later for Leopard), found at the Apple Developer site, on your Mac operating system installation CDs/DVD, or in the Mac App Store. Using the latest available version that will run on your OS is highly recommended, except for Snow Leopard where the last free version, 3.2.6, is recommended.

With Xcode 4 and later, users need to accept the Xcode EULA by either launching Xcode or running:

Apple’s Command Line Developer Tools, which can be installed on recent OS versions by running this command in the Terminal:

Older versions are found at the Apple Developer site, or they can be installed from within Xcode back to version 4. Users of Xcode 3 or earlier can install them by ensuring that the appropriate option(s) are selected at the time of Xcode’s install («UNIX Development», «System Tools», «Command Line Tools», or «Command Line Support»).

  • (Optional) The X11 windowing environment, for ports that depend on the functionality it provides to run. You have multiple choices for an X11 server:
    • Install the xorg-server port from MacPorts (recommended).
    • The XQuartz Project provides a complete X11 release for macOS including server and client libraries and applications.
    • Apple’s X11.app is provided by the “X11 User” package on older OS versions. It is always installed on Lion, and is an optional installation on your system CDs/DVD with previous OS versions.
  • macOS Package (.pkg) Installer

    The easiest way to install MacPorts on a Mac is by downloading the pkg or dmg for Big Sur, Catalina, Mojave, High Sierra, Sierra, El Capitan, Yosemite, Mavericks, Mountain Lion, Lion, Snow Leopard, Leopard or Tiger and running the system’s Installer by double-clicking on the pkg contained therein, following the on-screen instructions until completion.

    This procedure will place a fully-functional and default MacPorts installation on your host system, ready for usage. If needed your shell configuration files will be adapted by the installer to include the necessary settings to run MacPorts and the programs it installs, but you may need to open a new shell for these changes to take effect.

    The MacPorts “ selfupdate ” command will also be run for you by the installer to ensure you have our latest available release and the latest revisions to the “Portfiles” that contain the instructions employed in the building and installation of ports. After installation is done, it is recommended that you run this step manually on a regular basis to to keep your MacPorts system always current:

    Читайте также:  Windows delete printer registry

    At this point you should be ready to enjoy MacPorts!

    Type “ man port ” at the command line prompt and/or browse over to our Guide to find out more information about using MacPorts. Help is also available.

    Source Installation

    If on the other hand you decide to install MacPorts from source, there are still a couple of things you will need to do after downloading the tarball before you can start installing ports, namely compiling and installing MacPorts itself:

    1. “ cd ” into the directory where you downloaded the package and run “ tar xjvf MacPorts-2.7.1.tar.bz2 ” or “ tar xzvf MacPorts-2.7.1.tar.gz ”, depending on whether you downloaded the bz2 tarball or the gz one, respectively.
    2. Build and install the recently unpacked sources:
      • cd MacPorts-2.7.1
      • ./configure && make && sudo make install

      Optionally:

      • cd ../
      • rm -rf MacPorts-2.7.1*

    These steps need to be perfomed from an administrator account, for which “ sudo ” will ask the password upon installation. This procedure will install a pristine MacPorts system and, if the optional steps are taken, remove the as of now unnecessary MacPorts-2.7.1 source directory and corresponding tarball.

    To customize your installation you should read the output of “ ./configure —help | more ” and pass the appropriate options for the settings you wish to tweak to the configuration script in the steps detailed above.

    You will need to manually adapt your shell’s environment to work with MacPorts and your chosen installation prefix (the value passed to configure ‘s —prefix flag, defaulting to /opt/local ):

    • Add $/bin and $/sbin to the start of your PATH environment variable so that MacPorts-installed programs take precedence over system-provided programs of the same name.
    • If a standard MANPATH environment variable already exists (that is, one that doesn’t contain any empty components), add the $/share/man path to it so that MacPorts-installed man pages are found by your shell.
    • For Tiger and earlier only, add an appropriate X11 DISPLAY environment variable to run X11-dependent programs, as Leopard takes care of this requirement on its own.

    Lastly, you need to synchronize your installation with the MacPorts rsync server:

    Upon completion MacPorts will be ready to install ports!

    It is recommended to run the above command on a regular basis to keep your installation current. Type “ man port ” at the command line prompt and/or browse over to our Guide to find out more information about using MacPorts. Help is also available.

    Git Sources

    If you are developer or a user with a taste for the bleeding edge and wish for the latest changes and feature additions, you may acquire the MacPorts sources through git. See the Guide section on installing from git.

    Purpose-specific branches are also available at the https://github.com/macports/macports-base/branches url.

    Alternatively, if you’d simply like to view the git repository without checking it out, you can do so via the GitHub web interface.

    Selfupdate

    If you already have MacPorts installed and have no restrictions to use the rsync networking protocol (tcp port 873 by default), the easiest way to upgrade to our latest available release, 2.7.1, is by using the selfupdate target of the port(1) command. This will both update your ports tree (by performing a sync operation) and rebuild your current installation if it’s outdated, preserving your customizations, if any.

    Other Platforms

    Running on platforms other than macOS is not the main focus of The MacPorts Project, so remaining cross-platform is not an actively-pursued development goal. Nevertheless, it is not an actively-discouraged goal either and as a result some experimental support does exist for other POSIX-compliant platforms such as *BSD and GNU/Linux.

    The full list of requirements to run MacPorts on these other platforms is as follows (we assume you have the basics such as GCC and X11):

    • Tcl (8.4 or 8.5), with threads.
    • mtree for directory hierarchy.
    • rsync for syncing the ports.
    • cURL for downloading distfiles.
    • SQLite for the port registry.
    • GNUstep (Base), for Foundation (optional, can be disabled via configure args).
    • OpenSSL for signature verification, and optionally for checksums. libmd may be used instead for checksums.

    Normally you must install from source or from an git checkout to run MacPorts on any of these platforms.

    Help on a wide variety of topics is also available in the project Guide and through our Trac portal should you run into any problems installing and/or using MacPorts. Of particular relevance are the installation & usage sections of the former and the FAQ section of the Wiki, where we keep track of questions frequently fielded on our mailing lists.

    If any of these resources do not answer your questions or if you need any kind of extended support, there are many ways to contact us!

    Copyright © 2002–2021, The MacPorts Project. All rights reserved.

    Источник

    Оцените статью