14-11-2023

This commit is contained in:
2023-11-14 20:35:51 +01:00
parent 5b45dc0863
commit d78f93eed2
93 changed files with 8181 additions and 538 deletions

View File

@@ -31,6 +31,42 @@ $ brew upgrade
# --cleanup Met à jour et supprime les anciennes versions installées.
```
### Toutes les commandes:
```bash
$ brew commands
==> Built-in commands
--cache deps list search
--caskroom desc log shellenv
--cellar developer migrate tap-info
--env docs missing tap
--prefix doctor nodenv-sync uninstall
--repository fetch options unlink
--version formulae outdated unpin
analytics gist-logs pin untap
autoremove help postgresql-upgrade-database update-report
casks home postinstall update-reset
cleanup info pyenv-sync update
commands install rbenv-sync upgrade
completions leaves readall uses
config link reinstall vendor-install
==> Built-in developer commands
audit contributions generate-man-completions prof typecheck
bottle create install-bundler-gems release unbottled
bump-cask-pr determine-test-runners irb rubocop unpack
bump-formula-pr dispatch-build-bottle linkage ruby update-license-data
bump-revision edit livecheck sh update-maintainers
bump-unversioned-casks extract pr-automerge style update-python-resources
bump formula pr-publish tap-new update-sponsors
cat generate-cask-api pr-pull test update-test
command generate-formula-api pr-upload tests vendor-gems
==> External commands
bundle services
```
### Formules:
@@ -563,13 +599,15 @@ $ brew bundle
```bash
bruno@SilverBook:~$ brew services list
Name Status User Plist
mariadb started bruno /Users/bruno/Library/LaunchAgents/homebrew.mxcl.mariadb.plist
php71 started bruno /Users/bruno/Library/LaunchAgents/homebrew.mxcl.php71.plist
httpd started root /Library/LaunchDaemons/homebrew.mxcl.httpd.plist
Name Status User File
dbus none
emacs none
httpd started bruno ~/Library/LaunchAgents/homebrew.mxcl.httpd.plist
mariadb started bruno ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist
php started bruno ~/Library/LaunchAgents/homebrew.mxcl.php.plist
php@7.4 none
redis started bruno ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
unbound none
```
#### Lancer au démarrage:
@@ -606,22 +644,23 @@ $ brew services restart mysql
```bash
$ brew tap
caskroom/cask
homebrew/apache
homebrew/bundle
homebrew/cask
homebrew/cask-drivers
homebrew/cask-fonts
homebrew/core
homebrew/dupes
homebrew/php
homebrew/services
homebrew/versions
tideways/profiler
vapor/tap
joedrago/repo
shivammathur/extensions
shivammathur/php
sidneys/homebrew
```
<u>Les tap sont situés là:</u>
```bash
bruno@silverbook:/usr/local/Homebrew/Library/Taps$ ls
caskroom homebrew tideways vapor
/opt/homebrew/Library/Taps $ ls
homebrew joedrago shivammathur sidneys
```
#### Ajouter un repo:
@@ -640,26 +679,27 @@ $ brew untap <tapname>
```bash
$ brew config
HOMEBREW_VERSION: 2.2.4-6-g7fcae58
HOMEBREW_VERSION: 3.6.10
ORIGIN: https://github.com/Homebrew/brew
HEAD: 7fcae58af70da20b3be04327ebeebdf236333d27
Last commit: 19 hours ago
HEAD: eaf887656ffb8e9e35ccf08081814d4735637564
Last commit: 13 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 91f4df97adc4fcb9459b1a8dbd026c9fa1e45c31
Core tap last commit: 73 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_DEV_CMD_RUN: 1
HOMEBREW_NO_AUTO_UPDATE: 1
CPU: octa-core 64-bit skylake
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
Clang: 11.0 build 1100
Git: 2.25.0 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 13.0.1
macOS: 10.15.2-x86_64
CLT: N/A
Xcode: 11.3.1
XQuartz: 2.7.11 => /opt/X11
Core tap HEAD: 27b9f0718bb03e5ea933b5ceb5cd0cadb2bbd4a0
Core tap last commit: 19 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: nano
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 2.6.8 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: octa-core 64-bit arm_firestorm_icestorm
Clang: 14.0.0 build 1400
Git: 2.38.1 => /opt/homebrew/bin/git
Curl: 7.79.1 => /usr/bin/curl
macOS: 12.6-arm64
CLT: 14.1.0.0.1.1663981106
Xcode: 14.0.1
Rosetta 2: false
```
#### Afficher les formules qui ont le paquet cité comme dépendance (brew uses):
@@ -781,41 +821,68 @@ Les outils GNU sont préfixés par la lettre **g** (**g**ls, **g**cat, **g**chmo
*Les outils GNU sont installés dans /usr/local/bin/*
*Un alias sans le préfixe **g** est crée dans /usr/local/opt/coreutils/libexec/gnubin/*
*Un alias sans le préfixe **g** est crée dans /usr/local/opt/coreutils/libexec/gnubin/* ou */opt/homebrew/opt/coreutils/libexec/gnubin*
On peut ajouter le dossier /usr/local/opt/coreutils/libexec/gnubin dans le $PATH. Les outils GNU sont alors disponibles sans préfixe, à la place des outils BSD.
```bash
ls /opt/homebrew/opt/coreutils/libexec/gnubin/
'['
b2sum, base32, base64, basename, basenc,
cat, chcon, chgrp, chmod, chown, chroot, cksum, comm, cp, csplit, cut
date, dd, df, dir, dircolors, dirname, du,
echo, env, expand, expr,
factor, false, fmt, fold,
groups
head, hostid,
id, install,
join
kill
link, ln, logname ,ls
md5sum, mkdir, mkfifo, mknod, mktemp, mv
nice, nl, nohup, nproc, numfmt,
od
paste, pathchk, pinky, pr, printenv, printf, ptx, pwd,
readlink, realpath, rm, rmdir, runcon,
seq, sha1sum, sha224sum, sha256sum, sha384sum, sha512sum, shred, shuf, sleep, sort, split, stat, stdbuf, stty, sum, sync
tac, tail, tee, test, timeout, touch, tr, true, truncate, tsort, tty,
uname, unexpand, uniq, unlink, uptime, users,
vdir
wc, who, whoami
yes
```
On peut ajouter le dossier /usr/local/opt/coreutils/libexec/gnubin (/opt/homebrew/opt/coreutils/libexec/gnubin) dans le $PATH. Les outils GNU sont alors disponibles sans préfixe, à la place des outils BSD.
De même pour les man (`MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH"`)
```bash
# AVEC PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
# AVEC PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:$PATH"
which ls
/usr/local/opt/coreutils/libexec/gnubin/ls
/opt/homebrew/opt/coreutils/libexec/gnubin/ls
which gls
/usr/local/bin/gls
/opt/homebrew/bin/gls
(gls -> ../Cellar/coreutils/8.31/bin/gls)
which /bin/ls
/bin/ls
ls --version
ls (GNU coreutils) 8.31
ls (GNU coreutils) 9.1
gls --version
ls (GNU coreutils) 8.31
ls (GNU coreutils) 9.1
# SANS PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
# SANS PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:$PATH"
which ls
/bin/ls
which gls
/usr/local/bin/gls
/opt/homebrew/bin/gls
which /bin/ls
/bin/ls
@@ -824,7 +891,7 @@ ls (GNU coreutils) 8.31
ls: illegal option -- -
gls --version
ls (GNU coreutils) 8.31
ls (GNU coreutils) 9.1
```
Utiliser date ou gdate:
@@ -848,27 +915,27 @@ Comprend les versions GNU de *find, locate, xargs* (pas de updatedb dans osx )
```bash
$ brew install findutils
# SANS PATH="/usr/local/opt/findutils/libexec/gnubin:$PATH"
# SANS PATH="/opt/homebrew/opt/findutils/libexec/gnubin:$PATH"
$ which find
/usr/bin/find
$ which gfind
/usr/local/bin/gfind
/opt/homebrew/bin/gfind
$ gfind --version
find (GNU findutils) 4.7.0
Copyright (C) 2019 Free Software Foundation, Inc.
find (GNU findutils) 4.9.0
Packaged by Homebrew
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Eric B. Decker, James Youngman, and Kevin Dalley.
Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION FTS(FTS_CWDFD) CBO(level=2)
```
Ajouter `PATH="/usr/local/opt/findutils/libexec/gnubin:$PATH"` et `PATH="/usr/local/opt/findutils/libexec/gnuman:$PATH"` au $PATH pour accéder aux commandes sans le préfixe **g**.
Ajouter `PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:$PATH"` et `PATH="/opt/homebrew/opt/coreutils/libexec/gnuman:$PATH"` au $PATH pour accéder aux commandes sans le préfixe **g**.
@@ -1007,6 +1074,27 @@ brew update-reset
#### 4. error: Unable to create '/opt/homebrew/Library/Taps/homebrew/homebrew-core/.git/index.lock': File exists.
```bash
error: Unable to create '/opt/homebrew/Library/Taps/homebrew/homebrew-core/.git/index.lock': File exists.
Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
error: could not detach HEAD
```
Pour corriger, lancer:
```bash
rm /opt/homebrew/Library/Taps/homebrew/homebrew-core/.git/index.lock
```
### Réinstaller Homebrew
```bash