Where is macports error log
Choose one to install. If you know regex and know about the format of the PHP versions, you can further reduce the output of port search :.
Let us look at another example that is less complicated. Assuming you are looking for rrdtool , a popular system to store and graph time-series data, the simple search approach works well:. Treat the given search string as glob search string i. This is the default behavior. Can be specified multiple times to test against multiple fields. The default is --name --description. Search for ports that depend on the port given as search string.
Note that only dependencies specified in default variants will be found. The info action is used to get information about a port: name, version, description, variants, homepage, dependencies, license, and maintainers.
The deps action lists the dependencies of a port. Dependencies are the packages are required by a port at runtime library and runtime dependencies or required to install it build, fetch, and extract dependencies. Note that the list of dependencies might depend on the variants you chose. Do not read the Portfile to determine dependencies. Instead, rely on the information cached in the port index.
Note that despite specifying them , this option will ignore any effects of variants. It is, however, much faster. Exclude dependencies only required at build time, i. The variants action allows you to check what variations of a port are available before you install it. Variants are a way for port authors to provide options you can use to customize your build at install time.
See Invoking Port Variants below to install ports that have variants. This output lists all variants followed by their description. If a variant depends on or conflicts with other variants, a line detailing that follows. Any [] are derived from the Portfile. While are derived from the variants. See Section 6. The action install is used to install a port.
Once you determined the name of a port you want possibly using port search , you can install it using this command. See Section 3. For example,. If the installation of a port fails, you can enable verbose or debug output by giving the -v or -d flag to port:.
All debug information is also kept in main. Its path will be printed automatically if the installation fails. You can manually get the path using port logfile portname. Note that logfiles will automatically be deleted on successful installation.
To do that, re-run the installation with the -t flag, i. If the port still fails to install after you have followed these steps, please file a ticket and attach the main. The installation of a single port consists of multiple phases.
These phases are fetch, extract, patch, configure, build, destroot, archive, and finally install. You may break up a port's installation into smaller steps for troubleshooting by using the name of one of these phases as action rather than install.
For example. See Section 5. By default, a binary sanity check called rev-upgrade is run automatically after each successful installation. Pass this flag, if you want to avoid running this step, for example if you want to run it explicitly later after a number of installations using sudo port rev-upgrade , or if you know it will detect problems but want to defer dealing with them. If you want MacPorts to treat a port you installed manually as if it was automatically installed as a dependency e.
The notes action is used to display any notes that a port's author included. These can contain anything, but by convention are brief, and typically contain quick start steps for configuring and using the port, pitfalls to watch out for, or other information that users should be aware of. These same notes are also displayed after installing a port. Many ports have no notes.
More extensive documentation can often be found at a port's homepage, or in its installed files. The action clean deletes intermediate files created by MacPorts while installing a port. A port clean is often necessary when builds fail and should be the first thing to try after a failed installation attempt. Remove the work directory, i. This removes all traces of an attempted build and is the default operation.
The uninstall action will remove an installed port. It is one of the actions you will use fairly often in MacPorts. You can recursively uninstall all ports that depend on the given port before uninstalling the port itself to work around this.
To do that, use the --follow-dependents flag. You can also override this safety check using the -f force flag. Since this will obviously break the dependents you shouldn't do this unless you know what you are doing. Uninstalling a port will not uninstall ports that have been automatically installed as dependencies of the uninstalled port and are otherwise unused. You can trigger this behavior by passing the --follow-dependencies flag. Ports that were manually installed i. You can manually uninstall the unneeded ports later using the leaves pseudo-port, e.
Recursively uninstall ports that depend on the specified port before uninstalling the port itself. See also the textual description above. Also uninstall ports that were automatically installed as dependencies of the removed port and are no longer needed. The contents action displays a list of all files that have been installed by a given port. You can only use contents for ports you installed. Common uses for contents are finding the location of a port's executable after installing it.
The following line is usually helpful in this case:. The -q quiet flag suppresses the header line in this case, but is not strictly necessary. Used in conjunction with --size to choose the unit of the file size.
Valid parameters for UNIT are. The installed action displays the installed versions and variants of the specified ports, or if no ports are specified, all installed ports. Use -v to also display the platform and CPU architecture s for which the ports were built, and any variants which were explicitly negated. The outdated action checks your installed ports against the current ports tree to see they have been updated since you installed them. Note that you will only get new versions by updating your ports tree using selfupdate or sync.
In most cases, this will be an increase in the version number. If it isn't, more details will be given. The upgrade action upgrades installed ports and their dependencies to the latest version available in MacPorts. In most cases, you will run. You can, however, selectively upgrade ports if you want to delay other upgrades until later.
This is not recommended unless you know what you are doing, since you might experience software errors for the ports that have not yet been upgraded. To upgrade individual ports, specify the name s of the port s to upgrade:. Note that MacPorts may decide to upgrade other dependent ports before upgrading the port you requested to be updated. Do not attempt to prevent this, since it will very likely lead to problems later.
Instead, it deactivates it, i. This allows you to go back to the older version if there happens to be a problem with the updated one. To do that, run. If you do not want to keep the old versions around while upgrading, you can pass -u when upgrading:. If the installed variants do not match those requested, upgrade and change variants even if the port is not outdated. You can use this to switch the variant selection on an installed port, e. Note that --enforce-variants will also enforce your variant selection in all dependencies.
If you know this is not necessary, you can avoid processing dependencies using the global -n flag:. Do not automatically install replacement ports for a port that you have installed, but was replaced with a different one. The dependents action reports what ports depend upon a given installed port, if any. Note that dependents does not work for ports that are not installed on your system.
If you want to find out, which ports depend on a port that you have not installed, you can use. This command will, however, not cover dependencies that are only present in non-default variants.
The livecheck action checks to see if the application corresponding to a given port has been updated at the developer's download site. This action is mostly useful for port maintainers to determine whether their port needs to be updated, but other may also wish to see if a port packages the latest available version.
If livecheck finds no higher version at the port's download site, it prints nothing. The option -d debug may be used for detailed livecheck processing information. The lint action checks if the Portfile conforms to the MacPorts standards specified in Portfile Development. You should use this if you modified a Portfile before submitting patches back to MacPorts. Variants are a way for port authors to provide options for a port that may be chosen at installation. Typically, variants are optional features that can be enabled, but are not necessarily useful for all users and are thus not enabled by default.
To display the available variants for a port, if any, use this command:. If a variant depends on or conflicts with other variants, a line with the details on that follows. A variant can only be selected when a port is installed. After you have determined what variants a given port has, if any, you may install a port using a variant by specifying its name preceded by a plus sign on the command line, for example.
Note that you will not see any confirmation of successful variant selection and MacPorts will not warn you if you misspelled a variant's name. If your installation is successful, but the chosen feature still seems to be missing, check for possible typos.
You can use port installed to verify that the port has been installed with the chosen variant. This happens because MacPorts will also use the specified variants for any dependencies.
MacPorts will remember the variants that were used when installing a port. If you upgrade a port later, the same variants will be used, unless you manually specify different variants. A Portfile can specify a default set of variants that will be used when you do not manually override it.
Not all ports specify default variants — if there are no default variants, no variants are chosen by default. If you wish to disable a variant that has been enabled by default, either by the Portfile , or by your configuration in variants. This section lists common operations you may want to perform when managing a MacPorts installation.
These are the workflows you will need most while using MacPorts. We recommend you read at least this section as a primer into how to use MacPorts. More details about the usage can be found in Section 3. The local ports tree is a collection of files that contain information on which packages are available through MacPorts and how they can be installed.
You should regularly update your ports tree to get access to updated versions of software and bug fixes. To do that, use selfupdate :. To see what's new after running selfupdate , you can use port outdated to generate a list of ports that have newer versions available. This can help in estimating the time required for sudo port upgrade outdated , even though this depends on further factors such as binary package availability and a port's build time.
Note that MacPorts will upgrade any dependencies of a port first before updating the port itself. So even if you request the update of a single port only, other ports may be upgraded first because they are in the dependency tree. Do not try to avoid this, as it will very likely lead to problems later on — the new version of the port you want to upgrade might require the newer dependency, or it might only have been upgraded at all to be rebuilt against the updated dependency, in which case avoiding the update of the dependency defeats the purpose of the reinstallation.
By default, upgrading ports in MacPorts does not remove the older versions. This is a safety measure to ensure you can go back to a working and tested version in case an update goes wrong. To save disk space, you should periodically uninstall any old versions you no longer need.
Of course you could also select only a specific inactive port, but that requires to specify the exact version:. If you are only interested in the dependent ports that you actually have installed, you can use the quicker and more accurate dependents :. MacPorts also has a recursive version of the dependents action called rdependents :.
Finally, to find out which port you manually installed caused the automatic installation of a dependency, use the following expression:. After a while of using MacPorts, installing and uninstalling ports, packages that have been automatically installed as dependencies for other ports are left behind, even though they are no longer necessary.
These leaves may be wanted, but are in most cases unneeded. You can uninstall all leaves using. Note that the uninstallation can cause new ports to become leaves.
To uninstall all leaves, you can use the rleaves pseudo-port instead. After installation, run it with. Well, before we come to the procedure of defining your requested ports, let's have a look at a typical scenario where you want to understand what is actually installed and what is on the other hand truly necessary for your system.
Say checking leaves of your MacPorts installation gives this output:. Now it is up to the user to decide what's needed and what is not. We've noticed pkgconfig is needed to build many ports, and while it is strictly not needed after installation, we'd like to keep it around to avoid installing it over and over again. Since they are all distributable, MacPorts will use pre-built binaries for their installation anyway, so re-installing them wouldn't take long anyway.
We don't really know why the rest of the leaves were installed, so we're just going to remove them for now. When you've step-by-step figured out which ports you want to keep on your system and have set them as requested, you'll have a list of unnecessary ports, which you can get rid of using. Note that uninstalling leaves may mark new ports as leaves, so you will have to repeat the process.
It allows you to interactively decide whether to keep or uninstall a port. Run it as. You should also periodically check the list of your requested ports and mark any ports you no longer need as unrequested using. Then check for new leaves to cut down the number of installed ports and the size of your MacPorts installation. MacPorts can pre-compile ports into binaries so applications need not be compiled when installing on a target system.
MacPorts supports two types of binaries: archives and packages. Binary archives can only be used on a target system running MacPorts. They allow MacPorts utilities to skip the build which is usually the phase that takes longest and begin installation after the destroot phase. Binary archives are automatically created whenever a port is installed, and can also be downloaded from a server.
MacPorts runs a buildbot infrastructure that creates prebuilt binary packages for all ports in MacPorts for the default installation prefix. Buildbots exist for systems later or equal to Snow Leopard. If a port builds successfully and its license and those of its dependencies allow binary redistribution, the archives are uploaded to packages. The archive file type is set in macports. The default format is tbz2 ; other options are: tar , tbz , tbz2 , tgz , tlz , txz , xar , zip , cpgz , and cpio.
Binary packages are standalone binary installers that are precompiled; they do not require MacPorts on the target system. As such, they are helpful in generating disk images or installers to be redistributed to users without relying on MacPorts for installation. Binary installers created with MacPorts are usually. MacPorts can also convert a. You can create binary packages using port as shown in the following examples.
If you do that, your installer package conflicts with MacPorts on systems that do have MacPorts installed. Instead, follow Section 2. Then use this custom MacPorts installation to build your package. Create a macOS. In most cases you probably want to package a port and all its library and runtime dependencies in a single package. You can use a metapackage to do this.
Create one using:. Just as with a single package, a metapackage can also be wrapped in a. A port is a distribution of software that can be compiled and installed using MacPorts.
A Portfile describes all the required steps such as where to get the source code from upstream, which patches have to be applied and which other tools and commands are required to build the source code. Each port consists of multiple files in a directory, usually within a category subdirectory of the root of a ports tree. The MacPorts Project distributes the main ports tree that is by default configured in all installations of MacPorts.
This section serves as a reference for the directory structure of a single port and the layout of the files within.
The only required file in a port is the Portfile. Every port has a corresponding Portfile, but Portfiles do not completely define a port's installation behavior since MacPorts base has default port installation characteristics coded within it. Therefore Portfiles need only specify required options, though some ports may require non-default options.
A common way for Portfiles to augment or override MacPorts base default installation phase characteristics is by using Portfile phase declaration s. Any statements not contained within a phase declaration, no matter where they are located in a Portfile, are said to be in the global section of the Portfile; therefore the global section need not be contiguous. Likewise, to remove statements from the global section they must be placed within a phase declaration.
The default installation phase behavior performed by the MacPorts base works fine for applications that use the standard configure , make , and make install steps, which conform to phases configure, build, and destroot respectively. See Example Portfiles below. For a detailed description of all port phases, see the Portfile Reference chapter. Here we list the individual Portfile components for an application that conforms to the standard configure , make , and make install steps of most open source application installs.
This should be the first line of a Portfile. It sets the correct editing options for vim and emacs. See Port Style for more information. Its use is optional and up to the port maintainer. A port may belong to more than one category, but the first primary category should match the directory name in the ports tree where the Portfile is to reside.
A port's maintainers are the people who have agreed to take responsibility for keeping the port up-to-date. The maintainers keyword lists the maintainers' GitHub usernames or email addresses, preferably in the obfuscated form which hides them from spambots.
For more, see the full explanation of the maintainers keyword in the Global Keywords section of the Portfile Reference chapter. The checksums specified in a Portfile are checked with the fetched tarball for security. For the best security, use rmd and sha checksum types. Checksums should also include the target file's size. To find the correct checksums for a port's distribution file, follow one of these examples:.
In this section we begin by taking a look at a complete simple Portfile; then we see how to augment default phases by defining pre- and post- phases, how to override default phases , and finally how to eliminate port phases.
To augment a port's installation phase, and not override it, you may use pre- and post- installation phases as shown in this example. To override the automatic MacPorts installation phase processing, define your own installation phases as shown in this example.
Because many software packages do not use configure , a keyword is provided to eliminate the configure phase. Another exception is the destroot phase may not be eliminated. See the chapter Portfile Reference for full information. Variants are a way for port authors to provide options that may be invoked at install time. The most common actions for user-selected variants is to add or remove dependencies, configure arguments, and build arguments according to various options a port author wishes to provide.
Therefore, take care to never use hyphens in variant names. In the example variant declaration below, the configure argument --without-x is removed and a number of others are appended. Variants are used to specify actions that lie outside the core functions of an application or port, but there may be some cases where you wish to specify these non-core functions by default. Patch files are files created with the Unix command diff that are applied using the command patch to modify text files to fix bugs or extend functionality.
If you wish to contribute modifications or fixes to a Portfile, you should do so in the form of a patch. Follow the steps below to create Portfile patch files. Make a copy of the Portfile you wish to modify; both files must be in the same directory, though it may be any directory. Put the name of the port in the patchfile, for example, Portfile-rrdtool. The Portfile patch below will change the version and checksums when applied.
Now you may attach the patch file to a MacPorts Trac ticket for the port author to evaluate. Necessary or useful patches to application source code should generally be sent to the application developer rather than the port author so the modifications may be included in the next version of the application. Generally speaking, you should create one patch file for each logical change that needs to be applied. An example filename would be patch- destdir-variable-fix. Locate the file you wish to patch in its original location within the unpacked source directory and make a duplicate of it.
You should execute diff from the top-level directory of the unpacked source code, because during the patch phase MacPorts by default uses the patch argument -p0 , which does not strip prefixes with any leading slashes from file names found in the patch file as opposed to -p1 that strips one, etc , and any path not relative to the top-level directory of the unpacked source will fail during the patch phase.
If you find an existing source file patch you wish to use that contains leading path information diff was executed from a directory higher than the top-level source directory , you will need to use the patch phase keyword patch.
Place the patch patch-destdir-variable-fix. MacPorts applies patch files automatically, but you may want to know how to apply patch files manually if you want to test patch files you have created or you wish to apply uncommitted Portfile patches. Change to the directory containing the file to be patched. In this example, we'll apply a Portfile patch to the postfix port. Now apply the patch from your Downloads folder, or wherever you put it. The patchfile knows the name of the file to be patched.
To create and test Portfiles that are not yet published in the MacPorts ports tree, you may create a local Portfile repository as shown. Replace the hypothetical user julesverne with your username in the example below. Open sources. For example, to open it into TextEdit:. The file URL should always appear before the rsync URL so that local Portfiles can be tested that are duplicated in the MacPorts tree, because port will always operate on the first Portfile it encounters.
Place the Portfiles you create inside a directory whose name matches the port, which should in turn be placed inside a directory that reflects the port's primary category the first category entry in the Portfile. See other sections in the Guide for help writing Portfiles. If you've already written the Portfile elsewhere, you can instead copy the Portfile into this directory. If your Portfile needs to apply any patches to the port's source files, create a files directory and place the patchfiles in it, and reference the patchfiles in your Portfile, as explained in Creating Source Code Patches.
After you create or update your Portfile, use portindex in the local repository's directory to create or update the index of the ports in your local repository. Once the local port is added to the PortIndex , it becomes available for searching or installation as with any other Portfile in the MacPorts tree:.
This section contains practical guidelines for creating Portfiles that install smoothly and provide consistency between ports. The following sections are on the TODO list. Portfiles may be thought of as a set of declarations rather than a piece of code. It is best to format the port file is if it were a table consisting of keys and values. In fact, the simplest of ports will only contain a small block of values.
Nicely formatted compact tables will result in more values being visible at the same time. The two columns should be separated by spaces not tabs , so you should set your editor to use soft tabs, which are tabs emulated by spaces. By default, the top line of all Portfiles should use a modeline that defines soft tabs for the vim and emacs editors as shown.
The left column should consist of single words, and will be separated from the more complex right side by spaces in multiples of four. Variable assignments and variant declarations are exceptions, and may be considered a single word on the left side, with a single space between words. When items require multiple lines with line continuation, they can be separated from the previous and next items with a blank line. Indent the additional lines to the same column that the right side begins on in the first line.
Should a key item such as a phase or variant require braces, the opening brace should appear on the same line and the closing brace should be on its own line. The block formed by the braces is indented for visual clearance. Braces merely quoting strings, for example the description of variants, are placed on the same line without line breaks. Frequently multiple items are necessary in the second column.
Unless the second column items are few and short you should place each additional item on a new line and separate lines with a backslash. Indent the lines after the first line to make it clear the items are second column values and also to emphasize the unity of the block. At the end of this section the use of the obsolete PortGroup is suggested as an even shorter approach to the below described workflow.
The following steps have to be taken to ensure a smooth transition for a MacPorts user updating his local installation using sudo port upgrade :. Using the PortGroup obsolete makes the task described in the previous subsection much easier:. The PortGroup defines a number of reasonable defaults for a port that is only there to inform users that they should uninstall it and install something else instead. You might want to override some of the defaults though.
If a port has to be removed from MacPorts one should consider the hints concerning replacing it by some alternative port given above. It is recommended to wait one year before the port directory is actually removed from the MacPorts ports tree.
Every time a maintainer commits changes to MacPorts' ports Git repository the buildbot will check whether a rebuild of the corresponding port s would be necessary. If the port s in question are distributable their binary archives will be kept for subsequent distribution for all versions of the Mac operating system for which build machines are available. See the list of builders to find out which platforms these currently are. If a build error occurred for a port its maintainer will be informed via an email so that problems which did not surface on the maintainer's machine will not go unnoticed.
Port maintainers will find the waterfall and the builders views most useful since they give information about the build status and offer the possibility to build one's port s on specific builders. Thus the buildbot helps to keep MacPorts consistent on various macOS versions, i. Currently only the default port variants will be built and kept. This chapter serves as a reference for the major elements of a Portfile: port phases, dependencies, StartupItems, variables, keywords, and Tcl extensions.
MacPorts keywords are used to specify required or optional items within a Portfile, or to override default options used by MacPorts base for individual ports. The global keywords listed below specify information for ports as a whole, whereas the keywords listed under a port phase specify information to be used during a particular installation phase.
The first non-comment line of every Portfile; it should be followed by PortGroup inclusions if any and then a blank line. It defines which version of the Portfile interpreter will be used. There is currently only one version. The name of the port. To avoid special interpretation by shells and the like, names should contain only alphanumeric characters, underscores, dashes and periods.
The version of the software. Version numbers are often dotted decimals, though some projects may use other formats. The version keyword should adhere as closely as possible to the format used by the upstream project e. Especially, the version should not be misformatted merely to accommodate an unusual distfile name.
When updating the version of a port that installs a dynamic library, check by examining the second line of output from the otool -L command run on the library before and after upgrading whether its install name has changed. If it has, increase the revision of every port that links with the library to rebuild it with the new library. An optional integer the default is 0 that is incremented when a port is updated independently of the version of the software.
The revision line usually follows the version line. In Portfiles that have subports, it is often appropriate for each subport including the main port to have a separate revision line. This does not usually apply to Portfiles for Perl, PHP, Python, or Ruby modules which create numerous similar subports for the same version of the software. It is recommended to set the revision in all ports, even if the revision is 0. This makes it easier for other developers to see where to increase the revision in your port, should that need arise.
This is especially helpful for Portfiles that have subports. When increasing the revision in a Portfile with subports, consider carefully which of the subports possibly including the main port need to have their revisions increased.
When increasing the revision in a Portfile that does not have any revision lines yet, take a moment to check if the Portfile has subports. Just like when a port's version increases, a port is considered outdated when its revision increases.
To avoid causing users to rebuild ports unnecessarily, don't increase the revision unless doing so would result in a change for users who already have the ports installed. An optional integer the default is 0 that must be increased when a port is updated to a version that appears according to the vercmp procedure's version number comparison algorithm to be less than the previous version.
For example, updating from 2. The purpose of increasing the epoch is to cause MacPorts to consider a port to be outdated, even if that wouldn't otherwise be the case due to the specific version numbers. Don't set the epoch unless it's required. In most ports, the version number advances according to the normal dotted-decimal sequence, so most ports will never have a need to set the epoch.
When it is necessary to increase the epoch in such ports, the new epoch can be set to the current date. It is not recommended to use this format when adding an epoch to a port that does not already have one; instead, just set the epoch to 1 , and when needing to increase an existing small epoch, increase it by 1. A port's epoch can never be decreased. Removing the epoch from the port would decrease it to its default value of 0 , so once added to a port the epoch can also never be removed.
When adding an epoch, take extra care to ensure that it is necessary, since a mistakenly added epoch cannot be undone.
In Portfiles that have subports with different software versions, consider whether the epoch needs to be increased in all subports or only in some of them. The category under which the ported software falls. The first category should be the same as the directory within which the Portfile is stored; secondary and tertiary categories may be selected.
Most ports have only a single maintainer, but some ports have two or more co-maintainers. The maintainers keyword lists the maintainers' GitHub usernames or email addresses. GitHub usernames start with an symbol. Email addresses are preferably listed in the obfuscated form below to hide them from spambots:.
For addresses in other domains, e. Braces can be used to express that these refer to the same person, for example the GitHub username and an email. The address nomaintainer designates a port that is not maintained by anybody and may be modified by any committer.
Feel free to claim maintainership of a nomaintainer port if desired. The address openmaintainer designates a port that has a maintainer who allows minor changes to be committed without his or her prior approval.
Port maintainers who are not committers are encouraged to add openmaintainer to their ports. The long description can be based on a description provided by the upstream project e. More specific usage instructions are best left to the notes keyword. If a port provides a program that is different from the port name, it can be a good idea to include the program name in the long description so that a user could find it by searching.
Viewed 1k times. Improve this question. Add a comment. Active Oldest Votes. FYI: I faced similar error in Mavericks. Improve this answer. Afsar Uddin Md. Afsar Uddin 41 2 2 bronze badges. Sign up or log in Sign up using Google.
Sign up using Facebook. Sign up using Email and Password. Active 5 years, 10 months ago. Viewed 4k times. Before I did that, i uninstalled all macports-packages using: sudo port uninstall --follow-dependencies installed Now I'm running MacPorts 2. Improve this question. Add a comment. Active Oldest Votes. Improve this answer. It says that the software is not available.
I ran xcodebuild -license , and afterwards in worked. Preiviously I alse uninstalled ports completely. I thought sudo port selfupdate should do download and install the most recent version of MacPorts. I'm stil not sure if it also does it after an OS X upgrade. Bert Bert 1. Could you explain what you mean with a little more detail?
0コメント