|||
Mac安装apt-get
第一句没加sudo会有执行失败的地方
ABR:~ abREN$ /opt/local/bin/port selfupdate
ABR:~ abREN$ sudo /opt/local/bin/port selfupdate
ABR:~ abREN$ sudo /opt/local/bin/port install dpkg
ABR:~ abREN$ sudo /opt/local/bin/port install apt
另外可参考这个建议:
Try to find the executable. The symlink may have been lost
ABR:~ abREN$ locate apt-get
or
ABR:~ abREN$ find /-name apt-getYou can then restore the symlink if it's found with
ABR:~ abREN$ ln -s /path/to/apt-get /usr/bin/apt-get
2015-11-19 13:32 @Brussels, Belgium
-------------------
参考地址:
http://serverfault.com/questions/299488/bash-apt-get-command-not-found
安装花絮:
ABR:~ abREN$ /opt/local/bin/port selfupdate
---> Updating MacPorts base sources using rsync
Error: Error synchronizing MacPorts sources: command execution failed
Please run `port -v selfupdate' for details.
Error: /opt/local/bin/port: port selfupdate failed: Error synchronizing MacPorts sources: command execution failed
ABR:~ abREN$ sudo /opt/local/bin/port selfupdate
---> Updating MacPorts base sources using rsync
MacPorts base version 2.3.4 installed,
MacPorts base version 2.3.4 downloaded.
---> Updating the ports tree
---> MacPorts base is already the latest version
The ports tree has been updated. To upgrade your installed ports, you should run
port upgrade outdated
ABR:~ abREN$ sudo /opt/local/bin/port install dpkg
---> Computing dependencies for dpkg
---> Dependencies to be installed: coreutils gnutar perl5 perl5.16 gdbm
---> Fetching archive for coreutils
---> Attempting to fetch coreutils-8.24_0.darwin_13.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/coreutils
---> Attempting to fetch coreutils-8.24_0.darwin_13.x86_64.tbz2.rmd160 from http://mse.uk.packages.macports.org/sites/packages.macports.org/coreutils
---> Installing coreutils @8.24_0
---> Activating coreutils @8.24_0
The tools provided by GNU coreutils are prefixed with the character 'g' by
default to distinguish them from the BSD commands.
For example, cp becomes gcp and ls becomes gls.
If you want to use the GNU tools by default, add this directory to the front of
your PATH environment variable:
/opt/local/libexec/gnubin/
---> Cleaning coreutils
---> Fetching archive for gnutar
---> Attempting to fetch gnutar-1.28_0.darwin_13.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/gnutar
---> Attempting to fetch gnutar-1.28_0.darwin_13.x86_64.tbz2.rmd160 from http://mse.uk.packages.macports.org/sites/packages.macports.org/gnutar
---> Installing gnutar @1.28_0
---> Activating gnutar @1.28_0
---> Cleaning gnutar
---> Fetching archive for gdbm
---> Attempting to fetch gdbm-1.11_1.darwin_13.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/gdbm
---> Attempting to fetch gdbm-1.11_1.darwin_13.x86_64.tbz2.rmd160 from http://mse.uk.packages.macports.org/sites/packages.macports.org/gdbm
---> Installing gdbm @1.11_1
---> Activating gdbm @1.11_1
---> Cleaning gdbm
---> Fetching archive for perl5.16
---> Attempting to fetch perl5.16-5.16.3_1.darwin_13.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/perl5.16
---> Attempting to fetch perl5.16-5.16.3_1.darwin_13.x86_64.tbz2.rmd160 from http://mse.uk.packages.macports.org/sites/packages.macports.org/perl5.16
---> Installing perl5.16 @5.16.3_1
---> Activating perl5.16 @5.16.3_1
---> Cleaning perl5.16
---> Fetching archive for perl5
---> Attempting to fetch perl5-5.16.3_0+perl5_16.darwin_13.noarch.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/perl5
---> Attempting to fetch perl5-5.16.3_0+perl5_16.darwin_13.noarch.tbz2.rmd160 from http://mse.uk.packages.macports.org/sites/packages.macports.org/perl5
---> Installing perl5 @5.16.3_0+perl5_16
---> Activating perl5 @5.16.3_0+perl5_16
---> Cleaning perl5
---> Fetching archive for dpkg
---> Attempting to fetch dpkg-1.14.29_4.darwin_13.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/dpkg
---> Attempting to fetch dpkg-1.14.29_4.darwin_13.x86_64.tbz2.rmd160 from http://mse.uk.packages.macports.org/sites/packages.macports.org/dpkg
---> Installing dpkg @1.14.29_4
---> Activating dpkg @1.14.29_4
---> Cleaning dpkg
---> Updating database of binaries
---> Scanning binaries for linking errors
---> Found 1 broken file(s), matching files to ports
---> Found 1 broken port(s), determining rebuild order
---> Rebuilding in order
dpkg @1.14.29
---> Computing dependencies for dpkg
---> Cleaning dpkg
---> Scanning binaries for linking errors
---> Found 1 broken file(s), matching files to ports
---> Found 1 broken port(s), determining rebuild order
---> Rebuilding in order
dpkg @1.14.29
---> Computing dependencies for dpkg
---> Fetching distfiles for dpkg
---> Attempting to fetch dpkg_1.14.29.tar.gz from http://ftp.uk.debian.org/debian/pool/main/d/dpkg/
---> Attempting to fetch dpkg_1.14.29.tar.gz from http://mse.uk.distfiles.macports.org/sites/distfiles.macports.org/dpkg
---> Verifying checksums for dpkg
---> Extracting dpkg
---> Applying patches to dpkg
---> Configuring dpkg
---> Building dpkg
---> Staging dpkg into destroot
---> Deactivating dpkg @1.14.29_4
---> Cleaning dpkg
---> Uninstalling dpkg @1.14.29_4
---> Cleaning dpkg
---> Computing dependencies for dpkg
---> Installing dpkg @1.14.29_4
---> Activating dpkg @1.14.29_4
---> Cleaning dpkg
---> Updating database of binaries
---> Scanning binaries for linking errors
---> No broken files found.
ABR:~ abREN$ sudo /opt/local/bin/port install apt
---> Computing dependencies for apt
---> Dependencies to be installed: llvm-gcc42
---> Fetching archive for llvm-gcc42
---> Attempting to fetch llvm-gcc42-2336.11_3.darwin_13.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/llvm-gcc42
---> Attempting to fetch llvm-gcc42-2336.11_3.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/llvm-gcc42
---> Attempting to fetch llvm-gcc42-2336.11_3.darwin_13.x86_64.tbz2 from http://nue.de.packages.macports.org/macports/packages/llvm-gcc42
---> Fetching distfiles for llvm-gcc42
---> Attempting to fetch llvmgcc42-2336.11.tar.gz from http://mse.uk.distfiles.macports.org/sites/distfiles.macports.org/llvm-gcc42
---> Verifying checksums for llvm-gcc42
---> Extracting llvm-gcc42
---> Applying patches to llvm-gcc42
---> Configuring llvm-gcc42
---> Building llvm-gcc42
---> Staging llvm-gcc42 into destroot
---> Installing llvm-gcc42 @2336.11_3
---> Activating llvm-gcc42 @2336.11_3
---> Cleaning llvm-gcc42
---> Fetching archive for apt
---> Attempting to fetch apt-0.5.27_8.darwin_13.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/apt
---> Attempting to fetch apt-0.5.27_8.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/apt
---> Attempting to fetch apt-0.5.27_8.darwin_13.x86_64.tbz2 from http://nue.de.packages.macports.org/macports/packages/apt
---> Fetching distfiles for apt
---> Attempting to fetch apt_0.5.27.tar.gz from http://www.mirrorservice.org/sites/master.us.finkmirrors.net/distfiles/
---> Attempting to fetch apt_0.5.27.tar.gz from http://mse.uk.distfiles.macports.org/sites/distfiles.macports.org/apt
---> Verifying checksums for apt
---> Extracting apt
---> Applying patches to apt
---> Configuring apt
---> Building apt
---> Staging apt into destroot
---> Installing apt @0.5.27_8
---> Activating apt @0.5.27_8
---> Cleaning apt
---> Updating database of binaries
---> Scanning binaries for linking errors
---> No broken files found.
ABR:~ abREN$
1/1 | 鎬昏:10 | 棣栭〉 | 涓婁竴椤� | 涓嬩竴椤� | 鏈〉 | 璺宠浆 |
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2025-3-21 14:13
Powered by ScienceNet.cn
Copyright © 2007-2025 中国科学报社