lundi 15 novembre 2021

MacBrew problems

 

I get some problems when I tried update macbrew.

After 

sudo chown -R $(whoami) /usr/local

I didn't get problems.

√ /usr % echo $(whoami)

tortuesbranchees

Return the name of the owner of the current session.

cd /usr

ls -al

will return

drwxrwxr-x    18 tortuesbranchees  admin    576  6 oct 08:03 local

The solution is probably not perfect because another user will not been able to update macbrew


lundi 28 juin 2021

siunits CTAN package unavailable: how to solve

When updating MacTEX installation using tlmgr, an error occurred about siunits package (https://ctan.org/pkg/siunits). This package was declared present but could not be found.

It was impossible to delete this package with "sudo tlmgr remove -force siunits" because the package was not found !

The solution has been to delete the collection where this package was present:

sudo tlmgr remove -force collection-mathscience

And then install it again:

sudo tlmgr install collection-mathscience 

Now you can update MacTEX without error:

sudo /usr/local/texlive/2021/bin/universal-darwin/tlmgr update --self --all


samedi 26 juin 2021

Stop reporting gpg unavailable in MacOSX

 If you do not want to see this error again:

(not verified: gpg unavailable)

do 

brew install gnupg

lundi 22 mars 2021

Install XTide in Ubuntu server

In terminal

sudo apt-get install xorg-dev libxaw3dxft8-dev libpng-dev libsystemd-dev

cd $HOME

wget https://flaterco.com/files/xtide/harmonics-dwf-20210110-free.tar.xz

tar -xJf harmonics-dwf-20210110-free.tar.xz

cd harmonics-dwf-20210110 

sudo mkdir /usr/local/share/xtide

sudo chmod 755 /usr/local/share/xtide
sudo chmod 644 harmonics-dwf-20210110-free.tcd
sudo mv harmonics-dwf-20210110-free.tcd /usr/local/share/xtide

cd $HOME

rm -rf harmonics-dwf-20210110

rm harmonics-dwf-20210110-free.tar.xz

mkdir wxtide

cd wxtide

wget http://svhorizon.com/wxtide32/wxtdata/wxtide47.zip

unzip wxtide47.zip

chmod 644 harmonics-2004-06-14.tcd 

sudo mv harmonics-2004-06-14.tcd  /usr/local/share/xtide

cd $HOME

rm -rf wxtide

export HFILE_PATH=/usr/local/share/xtide/harmonics-dwf-20210110-free.tcd:/usr/local/share/xtide/harmonics-2004-06-14.tcd

mkdir wvs

cd wvs

wget https://flaterco.com/files/xtide/wvs.tar.xz

tar -xJf wvs.tar.xz

rm wvs.tar.xz

cd $HOME

export WVS_DIR=$HOME/wvs/

wget https://flaterco.com/files/xtide/libtcd-2.2.7-r3.tar.xz

tar -xJf libtcd-2.2.7-r3.tar.xz

cd libtcd-2.2.7

./configure; make; sudo make install

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"

cd $HOME

rm libtcd-2.2.7-r3.tar.xz

rm -rf libtcd-2.2.7


wget https://flaterco.com/files/xtide/xtide-2.15.3.tar.xz

tar -xJf xtide-2.15.3.tar.xz

cd xtide-2.15.3

./configure; make; sudo make install

cd $HOME

rm xtide-2.15.3.tar.xz

rm -rf xtide-2.15.3

wget https://flaterco.com/files/xtide/tcd-utils-20120115.tar.bz2

tar jxvf tcd-utils-20120115.tar.bz2

cd tcd-utils-20120115

./configure; make; sudo make install

cd $HOME

rm tcd-utils-20120115.tar.bz2

rm -rf tcd-utils-20120115


The binaries are here:

cd /usr/local/bin

build_tide_db  restore_tide_db  rewrite_tide_db.sh  tide  xtide

export PATH="$PATH:/usr/local/bin"

The harmonics files are here: 

cd /usr/local/share/xtide

harmonics-2004-06-14.tcd  harmonics-dwf-20210110-free.tcd

The coast lines are here:

cd wvs

wvs12.dat  wvs1.dat  wvs250k.dat  wvs3.dat  wvs43.dat  wvsfull.dat


To convert a tcd file in .txt and .xml file:
cd /usr/local/share/xtide
restore_tide_db harmonics-2004-06-14.tcd $HOME/harmonics-2004-06-14
restore_tide_db harmonics-dwf-20210110-free.tcd $HOME/harmonics-dwf-20210110-free

Example of use:

tide -l "Les Hattes" -b "2010-01-01 00:00" -e "2010-12-31 23:59" -f c -o "Yalimapo2010.csv"

Syntaxe

-b "YYYY-MM-DD HH:MM"

Specify the begin (start) time for predictions using the ISO 8601 compliant format YYYY-MM-DD HH:MM, where hours range from 00 to 23.  The timestamp is in the local time zone for the location, or in UTC if the -z setting is engaged.  If clock mode is selected or if no -b is supplied, the current time will be used.  (Note Quirk #1)

-e "YYYY-MM-DD HH:MM"

Specify the end (stop) time for predictions in banner, calendar, alt. calendar, medium rare, plain, raw, or stats mode.  Does not apply in graph and clock modes:  the effective end time for graph and clock modes is entirely determined by the start time (-b), the width (-cw, -gw or -tw), and the aspect (-ga).  The format and time zone are the same as for -b.  If no -e is supplied, the end time will be set to four days after the begin time.  (Note Quirk #2)

When it matters, -b and -e ranges mean specifically "all t such that b ≤ t < e."

-f c|h|i|l|p|t|v

Specify the output format as CSV, HTML, iCalendar, LaTeX, PNG, text, or SVG.  See the modes page for legal modes and formats.  The default is text.

-l "Location Name"

Specify a location for tide predictions.  You get the first station where the name supplied with -l is a case-insensitive match with the beginning (or the entirety) of the station's name.  You can use the -l switch more than once if you want to specify multiple locations.

-m a|b|c|C|g|k|l|m|p|r|s

Specify mode to be about, banner, calendar, alt. calendar, graph, clock, list, medium rare, plain, raw, or stats.  See the modes page for legal modes and formats.  The default is plain.

-ml [-]N.NN(ft|m|kt)

Specify the mark level to be used in predictions.  The predictions will include the times when the tide level crosses the mark.  Not supported in clock mode.  Example usage: -ml -0.25ft

-o "filename"

Redirect output to the specified file (appends).

-s "HH:MM"

Specify the step interval, in hours and minutes, for raw or medium rare mode predictions.  The default is one hour.

-v

Print version string and exit.  Please note that versions marked as DEVELOPMENT versions are not really versioned; they are work in progress and will change without warning.


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.