jeudi 19 novembre 2020

Manipulating SD card

 If you are stucked with a SD card that you cannot format, try this solution:

Open terminal

diskutil list

Search your disk. It will appear as a diskx disk with some partitions, for example s1 and s2

Try:

sudo diskutil eraseVolume free free disk2s2

and 

sudo diskutil eraseVolume free free disk2s1

After you can format the SD card.

Take care, this procedure will erase the content of your SD card.


lundi 2 novembre 2020

photoanalysisd and photo

It you cannot eject a shared volume or if your shared volume is always mounted, perhaps it is based on photoanalysisd that analyzed your photos.
Check which software is using your disk with:
First, search for the name or your volumes using
ls /Volumes/
Then, look what software is using the volume MyDrive
sudo lsof /Volumes/myDrive

For what it's worth (and with all the usual disclaimers about potentially making your mac unstable by disabling system services), here's some commands that will manipulate this service and services like it. Note the $UID in the command, that's just a bash shell variable that will resolve to some number. That's your numeric UID. You just run these commands from a Terminal command line. No special privileges needed.
If you want to disable it entirely, the first command stops it from respawning, and the second kills the one that is currently running:
launchctl disable gui/$UID/com.apple.photoanalysisd
launchctl kill -TERM gui/$UID/com.apple.photoanalysisd
(If you kill it without disabling it will die, but a new one will respawn and pick up where the old one left off)
I don't have this problem myself, so I can't try these next two commands. They're relying on good ole UNIX signals. You could theoretically suspend and resume the process like this ("STOP" and "CONT" are stop and continue):
launchctl kill -STOP gui/$UID/com.apple.photoanalysisd
launchctl kill -CONT gui/$UID/com.apple.photoanalysisd
It seems that there is another process that do the same:
launchctl disable gui/$UID/com.apple.photolibraryd
launchctl kill -TERM gui/$UID/com.apple.photolibraryd


It does not work with macOS Catalina (:

jeudi 20 août 2020

Some problems with system extensions

 

homebrew.mxcl.unbound set an error 1. First I tried:

sudo chown root:wheel /Library/LaunchDaemons/homebrew.mxcl.unbound.plist

It does not change anything

Then I uncheck the boxes Run at load and I select Don't keep alive within LaunchControl, section Global Daemons. No more problem until now.

paloaltonetworks was an obsolete extension version when 4.9 version was ran (https://developer.apple.com/fr/support/kernel-extensions/). 5.2.1 seemed to solve the problem.



lundi 27 janvier 2020

keg-only libraries

imagemagick@6 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.

If you need to have imagemagick@6 first in your PATH run:
  echo 'export PATH="/usr/local/opt/imagemagick@6/bin:$PATH"' >> ~/.zshrc

For compilers to find imagemagick@6 you may need to set:
  export LDFLAGS="-L/usr/local/opt/imagemagick@6/lib"
  export CPPFLAGS="-I/usr/local/opt/imagemagick@6/include"

For pkg-config to find imagemagick@6 you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/imagemagick@6/lib/pkgconfig"

#############

To use the bundled libc++ please add the following LDFLAGS:
  LDFLAGS="-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib"

llvm is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have llvm first in your PATH run:
  echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> ~/.zshrc

For compilers to find llvm you may need to set:
  export LDFLAGS="-L/usr/local/opt/llvm/lib"

  export CPPFLAGS="-I/usr/local/opt/llvm/include"

#############

openldap is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have openldap first in your PATH run:
  echo 'export PATH="/usr/local/opt/openldap/bin:$PATH"' >> ~/.zshrc
  echo 'export PATH="/usr/local/opt/openldap/sbin:$PATH"' >> ~/.zshrc

For compilers to find openldap you may need to set:
  export LDFLAGS="-L/usr/local/opt/openldap/lib"
  export CPPFLAGS="-I/usr/local/opt/openldap/include"

##############

==> libffi

libffi is keg-only, which means it was not symlinked into /usr/local,

because macOS already provides this software and installing another version in

parallel can cause all kinds of trouble.


For compilers to find libffi you may need to set:

  export LDFLAGS="-L/usr/local/opt/libffi/lib"

  export CPPFLAGS="-I/usr/local/opt/libffi/include"


==> llvm

To use the bundled libc++ please add the following LDFLAGS:

  LDFLAGS="-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib"


llvm is keg-only, which means it was not symlinked into /usr/local,

because macOS already provides this software and installing another version in

parallel can cause all kinds of trouble.


If you need to have llvm first in your PATH run:

  echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> ~/.zshrc


For compilers to find llvm you may need to set:

  export LDFLAGS="-L/usr/local/opt/llvm/lib"

  export CPPFLAGS="-I/usr/local/opt/llvm/include"


##############


poppler-qt5 is keg-only, which means it was not symlinked into /opt/homebrew,

because it conflicts with poppler.


If you need to have poppler-qt5 first in your PATH, run:

  echo 'export PATH="/opt/homebrew/opt/poppler-qt5/bin:$PATH"' >> ~/.zshrc


For compilers to find poppler-qt5 you may need to set:

  export LDFLAGS="-L/opt/homebrew/opt/poppler-qt5/lib"

  export CPPFLAGS="-I/opt/homebrew/opt/poppler-qt5/include"


For pkg-config to find poppler-qt5 you may need to set:

  export PKG_CONFIG_PATH="/opt/homebrew/opt/poppler-qt5/lib/pkgconfig"

  export PKG_CONFIG_PATH="/opt/homebrew/opt/poppler-qt5/share/pkgconfig"



mercredi 22 janvier 2020

Test SMART status in ubuntu and clone disk

sudo apt install smartmontools

Then read the name of your disk:
sudo parted -l

sudo smartctl -a /dev/sdx

or more complete

sudo smartctl -x /dev/sdx

with devx being the name of your disk

To clone a drive:
sudo dd if=/dev/sda of=/dev/sdb

with sda being the disk to clone and sdb the disk to receive the copy