FreeBSD Software Installation and Uninstallation Tools–Detailed Description of Ports and Packages

Time:2019-9-3

1. How to grab the tarball only?
2. How can we only do the steps of unlocking the tarball?
3. How to unlock the tarball and add the official patch?
4. How to install a new port?
5. How to install a new port and package it?
6. How to package a port and all its dependent ports?
7. How to package an installed port?
8. How to clean up the temporary data generated during the editing of ports?
9. How to clean up the temporary data generated during ports editing and the corresponding tarball?
10. How to query the required dependency/related Suites before installing ports?
11. How to remove installed ports?
12. How to remove the dependent ports together?
13. How to reinstall installed ports?
14. How to search ports with keywords?
15. How to upgrade the installed ports?
16. How to query which suites are installed in the current system?
17. How to query whether the current system has installed this keyword suite?
18. How to query which suites a file belongs to?
19. How to query which files are installed in a suite?
20. How to install the old version of ports?
21. How to update ports Mk?
22. How to solve the sed-i error when installing ports?
23. How to list all upgradable ports?
24. How do you know the compilation parameters provided by ports system for a ports?
25. How to manually add the compiled ports parameters?
26. How to specify the installation path of ports?
27. Error message of FORCE_PKG_REGISTER in installing ports
28. Error message of Shared object libintl.so.X not found in installation ports
29. How to install packages?
30. How to force the installation of packages?
31. How to query the dependency between packages and other packages?
32. How to install packages remotely?
33. How to update the INDEX control table?
34. How to update INDEX HTML?
35. How to avoid CVSup for some ports?
36. How to use CVSup to synchronize ports collections?
37. Error message of port is outdated when installing ports
39. Error message of OpenSSL vulnerabilities in installation ports
40. How to simulate Linux environment on FreeBSD?
41. How to install Linux rpm on FreeBSD?
42. When installing ports, the list options that should have appeared disappear
43. How to check if there are overlapping ports/packages installed? ` What’s the difference between make deinstall and `pkg_delete’?
44. Local modification time does not match remote when installing ports
Error message

1. How to grab the tarball only?

If you only want to grab the tarball, just make fetch.
If you want to grab a single port, take editors/joe as an example, then:

Code:
cd /usr/ports/editors/joe/
make fetch

By default, joe’s tarball will be downloaded to / usr / ports / distfiles / directory.
If you want to grab the tarball of all the other ports you need to install this ports, use the

For example, systuils/portupgrade

Code:
cd /usr/ports/systuils/portupgrade/
make fetch-recursive

By default, the tarball for this ports and the tarball for all other ports you need will be downloaded to / usr / ports / distfiles / directory.

If you want to grab the tarball of all ports, then:

Code:
cd /usr/ports/
make fetch

The Club downloads the tarballs of all ports to / usr / ports / distfiles / directory.
If you want to grab the tarball of all ports under all ftp, then:

Code:
cd /usr/ports/ftp/
make fetch

The Club downloads the tarballs of all ports under FTP to / usr / ports / distfiles/
Under the catalogue.

2. How can we only do the steps of unlocking the tarball?

Sometimes when you are used to patch / modify the original code, this function is often used.
Take editors/joe as an example, then:

Code:
cd /usr/ports/editors/joe/
make extract

Targeball will be unrolled into the / usr / ports / editors / Joe / work / directory.

3. How to unlock the tarball and add the official patch?

This method is similar to those of the other two, but it is different from filling in the patch provided by the government first and then proceeding with the patch itself.
Amendment. Take editors/joe as an example, then:

Code:
cd /usr/ports/editors/joe/
make patch

Targeball will be unlocked to / usr / ports / editors / Joe / work / directory and already on Patch
Official patch.

4. How to install a new port?

If this software is not installed on the system, you can choose to install a new port.
Take editors/joe as an example, then:

Code:
cd /usr/ports/editors/joe/
make install

This will install a new Joe software on the system. If you need to clear the edit after the installation is complete
The temporary catalogue left over from the period can be used with reference to the FAQ 8 method, such as:

Code:
cd /usr/ports/editors/joe/
#make clean

If you want to clear all temporary data generated by ports at once, just go back to the root directory of the ports.
All right:

Code:
cd /usr/ports/
#make clean

5. How to install a new port and package it?

Packaging the installed software has many advantages: it can be used for other machines, including clustering systems.
This package can be reused for quick reinstallation if you use it or if something goes wrong with the software in the future.
Take editors/joe as an example, then:

Code:
cd /usr/ports/editors/joe/
#make package

This will install a new Joe software on the system and package it.

Package is presupposed to be in the / usr / ports / editors / Joe / directory, if you want centralized management,
The following steps are recommended:

Code:
mkdir -p /usr/ports/packages/All/

Later packages will be stored in this directory, and the system will automatically classify them to facilitate management.
Li. If you need to clear the temporary directories left over during editing after the installation is completed, you can participate in the
Examination FAQ 8 method, use together, such as:

Code:
cd /usr/ports/editors/joe/
make package clean

6. How to package a port and all its dependent ports?

Because FAQ 5 only packages the final ports, the dependent ports do not play together.
Packets, a common problem that arises when editing a port depends on others
Ports, then other ports must be packaged together, otherwise installing packages will depend on them.
It ports packages problems.
Take sysutils/portupgrade as an example.

Code:
cd /usr/ports/sysutils/portupgrade/
make DEPENDS_TARGET=package package

This will package all the ports that are dependent on the portupgrade, including itself.

7. How to package an installed port?

If a package is installed, it is not packed beforehand and wants to be packed afterwards, then:
Take editors/joe for example

Code:
cd /var/db/pkg/
Pkg_create-b joe-{version number}

The installed ports are packaged and placed in the / var / db / PKG / directory.

8. How to clean up the temporary data generated during the editing of ports?

When editing ports, there are work directories needed during editing, so they are usually installed.
After a suite, this temporary directory is cleared to save system disk space.
Take editors/joe as an example, then:

Code:
cd /usr/ports/editors/joe/
make clean

If you want to clear the temporary directories of all ports, then:

Code:
cd /usr/ports/
make clean

If you want to clear all temporary directories under all ftp, then:

Code:
cd /usr/ports/ftp/
make clean

9. How to clean up the temporary data generated during ports editing and the corresponding tarball?

In FAQ 8, only the work needed during editing is cleared, and no compilation is performed.
The tarball downloaded with ports is deleted (corresponding tarball is preset to be stored)
In / usr / ports / distfiles /), if you want to delete the tarball together,
Take editors/joe as an example, then:

Code:
cd /usr/ports/editors/joe/
make distclean

The step to make distclean includes the function of make clean, that is to say, except that it will be deleted.
In addition to tarball, M will also include the working directories required during editing.

If you want to clear all ports’temporary directories and tarballs, then:

Code:
cd /usr/ports/
make distclean

If you want to clear all temporary directories and tarballs under all ftp, then:

Code:
cd /usr/ports/ftp/
make distclean

10. How to query the required dependency/related Suites before installing ports?

Before installing ports, you can query the required dependency / related suites.
Take mail/p5-Mail-SpamAssassin as an example, then:

Code:
cd /usr/ports/mail/p5-Mail-SpamAssassin/
Make all-dependent-list Display all relevant Suites
Makepretty-print-build-dependent-list # Displays the suites needed during compilation
Make pretty-print-run-dependent-list # to display the suite needed to execute this suite

11. How to remove installed ports?

Take editors/joe as an example, then:

Code:
cd /usr/ports/editors/joe/
make deinstall

Or use pkg_delete

Code:
cd /var/db/pkg/
pkg_delete joe-{version}

Sometimes the dependencies between packages can not be removed directly, if forced, then:

Code:
cd /var/db/pkg/
pkg_delete -f joe-{version}

But it is likely to cause problems in the execution of other suites.

For differences between the two, please refer to FAQ 43.

Previous page123 Read the full text on the next page

Recommended Today

SQL exercise 20 – Modeling & Reporting

This blog is used to review and sort out the common topic modeling architecture, analysis oriented architecture and integration topic reports in data warehouse. I have uploaded these reports to GitHub. If you are interested, you can have a lookAddress:https://github.com/nino-laiqiu/TiTanI recorded a relatively complete development process in my hexo blog deployed on GitHub. You can […]