Java classpath in Cocoa - cocoa

I am developing an application in cocoa which uses some java classes .I need to set the app point to
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0
instead of:
/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK.
Is it possible to do this..
Thanks in advance

Not a solution, just wanted to point out that your problem (which is I guess that your app does not run with Java6, but needs Java5) may be bigger than you think, because on Snow Leopard, these two directories are the same:
$ ls -la /System/Library/Frameworks/JavaVM.framework/Versions/
total 64
drwxr-xr-x 13 root wheel 442 Dec 5 12:16 .
drwxr-xr-x 12 root wheel 408 Dec 5 12:16 ..
lrwxr-xr-x 1 root wheel 5 Dec 5 12:15 1.3 -> 1.3.1
drwxr-xr-x 3 root wheel 102 Jul 21 2009 1.3.1
lrwxr-xr-x 1 root wheel 10 Dec 5 12:15 1.4 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Dec 5 12:15 1.4.2 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Dec 5 12:15 1.5 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Dec 5 12:15 1.5.0 -> CurrentJDK
lrwxr-xr-x 1 root wheel 5 Dec 5 12:15 1.6 -> 1.6.0
drwxr-xr-x 8 root wheel 272 Oct 19 10:54 1.6.0
drwxr-xr-x 9 root wheel 306 Dec 5 12:16 A
lrwxr-xr-x 1 root wheel 1 Dec 5 12:15 Current -> A
lrwxr-xr-x 1 root wheel 3 Dec 5 12:15 CurrentJDK -> 1.6
It does seem possible, though, to copy the real Java5 over from a 10.5 installation.

Related

Gradle is changing my zip file from resources

Welcome,
I would like to add custom resources - a zip file to my project
Gradle is somehow changing my zip file and I don't know how and why
Sources:
total 11576
drwxr-xr-x 5 user staff 160 Nov 1 00:39 .
drwxr-xr-x 7 user staff 224 Oct 31 14:17 ..
-rw-r--r-- 1 user staff 5900938 Oct 31 15:33 Custom.zip
-rw-r--r-- 1 user staff 16452 Nov 1 00:35 swagger.yaml.zip
-rw-r--r-- 1 user staff 12 Nov 1 00:39 test.txt
Build directory
total 20880
drwxr-xr-x 5 user staff 160 Nov 1 00:39 .
drwxr-xr-x 7 user staff 224 Nov 1 00:39 ..
-rw-r--r-- 1 user staff 10652091 Nov 1 00:39 Custom.zip
-rw-r--r-- 1 user staff 29355 Nov 1 00:39 swagger.yaml.zip
-rw-r--r-- 1 user staff 12 Nov 1 00:39 test.txt
Zip files in build resources have more bytes and are not valid zips anymore, simple text file is not changed
Environment
Gradle 7.5
------------------------------------------------------------
Build time: 2022-07-14 12:48:15 UTC
Revision: c7db7b958189ad2b0c1472b6fe663e6d654a5103
Kotlin: 1.6.21
Groovy: 3.0.10
Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM: 17.0.4.1 (Azul Systems, Inc. 17.0.4.1+1-LTS)
OS: Mac OS X 12.6 aarch64

Nativescript project cannot run ng serve

If I try to run the following command, this happens:
ng serve
An unhandled exception occurred: No projects support the 'serve' target.
See "/tmp/ng-YKKFYj/angular-errors.log" for further details.
in the same directory, where the angular.json, the package.json, src folder etc. is, see:
forest#forest:~/<project-path>$ ls -lsa
total 380
4 drwxrwxr-x 8 forest forest 4096 dec 17 17:44 .
4 drwxrwxr-x 7 forest forest 4096 dec 17 16:20 ..
4 -rw-r--r-- 1 forest forest 383 okt 26 1985 angular.json
4 drwxrwxr-x 4 forest forest 4096 dec 12 14:16 App_Resources
4 -rw-r--r-- 1 forest forest 202 okt 26 1985 .editorconfig
4 -rw-r--r-- 1 forest forest 260 dec 17 15:43 .gitignore
4 drwxrwxr-x 5 forest forest 4096 dec 17 14:02 hooks
4 drwxr-xr-x 3 root root 4096 dec 13 15:41 .idea
12 -rw-r--r-- 1 forest forest 11368 okt 26 1985 LICENSE
20 drwxrwxr-x 567 forest forest 20480 dec 17 16:15 node_modules
4 -rw-r--r-- 1 forest forest 62 okt 26 1985 nsconfig.json
4 -rw-rw-r-- 1 forest forest 1315 dec 17 16:15 package.json
264 -rw-rw-r-- 1 forest forest 267877 dec 17 16:15 package-lock.json
4 drwxrwxr-x 3 forest forest 4096 dec 17 16:04 platforms
4 drwxrwxr-x 4 forest forest 4096 dec 17 15:26 src
4 -rw-r--r-- 1 forest forest 670 dec 17 16:34 tsconfig.json
4 -rw-r--r-- 1 forest forest 126 okt 26 1985 tsconfig.tns.json
4 -rw-r--r-- 1 forest forest 38 okt 26 1985 tsfmt.json
4 -rw-rw-r-- 1 forest forest 3093 dec 17 17:44 tslint.json
4 -rw-r--r-- 1 forest forest 1575 dec 12 18:16 tslint_old.json
16 -rw-rw-r-- 1 forest forest 14103 dec 17 13:23 webpack.config.js
forest#forest:~/<project-path>$ ng serve
An unhandled exception occurred: No projects support the 'serve' target.
See "/tmp/ng-dO1bgr/angular-errors.log" for further details.
Versions:
$ng --version:
Angular CLI: 8.3.19
Node: 12.3.1
OS: linux x64
Angular: 8.2.14
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
------------------------------------------------------
#angular-devkit/architect 0.803.19 (cli-only)
#angular-devkit/core 8.2.2
#angular-devkit/schematics 8.3.19 (cli-only)
#ngtools/webpack 8.2.2
#schematics/angular 8.3.19 (cli-only)
#schematics/update 0.803.19 (cli-only)
rxjs 6.5.3
typescript 3.5.3
webpack 4.27.1
$tns --version
6.2.2
The project can be build for Android though.
You should use Schematics for code sharing project which does all the setup for Web and iOS / Android.
If you had created it from template, you might have to manually configure the project to support web.

how to check for shared library dependancies in petalinux

I have successfully cross compiled a sample application for Zynq Zedboard using arm-linux-gnueabi. I am running petalinux on it. However running the application xiSample gives the following error:
./xiSample: error while loading shared libraries: /usr/lib/libm3api.so.2: internal error
Further, ls -l on /usr/lib/ gives:
root#xiAPI:/usr/lib# ls -l
lrwxrwxrwx 1 root root 42 Mar 13 2018 ld-linux-
armhf.so.3 -> /usr/arm-linux-gnueabihf/lib/sf/ld-2.23.so
-rwxr-xr-x 1 root root 45556 Mar 13 2018 libjbig.so.2
-rwxr-xr-x 1 root root 15284 Mar 13 2018
libjbig85.so.2.0
-rwxr-xr-x 1 root root 222748 Mar 13 2018 libjpeg.so.8
-rwxr-xr-x 1 root root 222748 Mar 13 2018
libjpeg.so.8.1.2
-rwxr-xr-x 1 root root 193248 Mar 13 2018 liblzma.so.5
-rwxr-xr-x 1 root root 193248 Mar 13 2018
liblzma.so.5.2.3
lrwxrwxrwx 1 root root 13 Jan 1 00:54 libm3api.so -
> libm3api.so.2
lrwxrwxrwx 1 root root 17 Jan 1 00:58 libm3api.so.0
-> libm3api.so.0.0.0
-rwxr-xr-x 1 root root 19850208 Jan 1 00:54
libm3api.so.0.0.0
lrwxrwxrwx 1 root root 17 Jan 1 00:58 libm3api.so.2
-> libm3api.so.2.0.0
-rwxr-xr-x 1 root root 23453232 Jan 1 00:54
libm3api.so.2.0.0
-rwxr-xr-x 1 root root 441068 Mar 13 2018 libtiff.so.5
-rwxr-xr-x 1 root root 441068 Mar 13 2018
libtiff.so.5.3.0
-rwxr-xr-x 1 root root 9760 Mar 13 2018
libtiffxx.so.5
-rwxr-xr-x 1 root root 9760 Mar 13 2018
libtiffxx.so.5.3.0
-rwxr-xr-x 1 root root 106100 Mar 13 2018 libz.so.1
-rwxr-xr-x 1 root root 106100 Mar 13 2018
libz.so.1.2.11
lrwxrwxrwx 1 root root 18 Jan 1 00:56 m3api ->
/opt/XIMEA/include
drwxr-xr-x 3 root root 4096 Feb 22 2018 opkg
How can I find the shared libraries my executable needs, as petalinux does not contain ldd or file.
EDIT: I am having trouble further isolating error. Any suggestion on what might be causing this? I think it is a linking error.
In Petalinux environment, this is what you can do:
readelf -d xiSample | grep NEEDED
This will list the required dynamic dependencies.
A similar answer here: https://unix.stackexchange.com/questions/120015/how-to-find-out-the-dynamic-libraries-executables-loads-when-run

Location of virtual machines in mac for virtual box

What is the location of all .vbox files that are created in virtual box in a mac. And how can we delete it?
I mistakenly deleted virtualbox.app file from Applications and now I want to delete all the remains of all virtual box files.
I tried following things:
drwxr-xr-x# 3 user admin 102 Dec 19 19:57 vagrant
-rw-r--r-- 1 root wheel 1824496 Feb 21 17:17 com.vagrant.vagrant.bom
-rw-r--r-- 1 root wheel 240 Feb 21 17:17 com.vagrant.vagrant.plist
drwx------ 5 root wheel 170 Feb 21 16:59 ubuntu-cloudimg-precise-vagrant-amd64_1487725164672_27815
./private/var/root/VirtualBox VMs/ubuntu-cloudimg-precise-vagrant-amd64_1487725164672_27815:
-rw------- 1 root wheel 3036 Feb 21 16:59 ubuntu-cloudimg-precise-vagrant-amd64_1487725164672_27815.vbox
-rw------- 1 root wheel 3036 Feb 21 16:59 ubuntu-cloudimg-precise-vagrant-amd64_1487725164672_27815.vbox-prev
lrwxr-xr-x 1 root wheel 24 Feb 21 17:17 vagrant -> /opt/vagrant/bin/vagrant
But I could not find the location of .vbox files to manually delete them.
By default the .vbox files normally go into your users' home directory:
pwd
/Users/Astro58/VirtualBox VMs
total 264
drwx------# 6 lance staff 204 Feb 22 19:03 ./
drwxr-xr-x+ 88 lance staff 2992 Feb 22 16:11 ../
drwx------ 6 lance staff 204 Feb 22 19:50 Laravel_default_1487808229046_76286/
drwx------ 7 lance staff 238 Feb 20 12:53 legacy_default_1487457532080_39585/
You should be able to delete the "VirtualBox VMs" directory via the rm command or via the Mac Finder.

Invalid active developer path on MAC OS X after installing Ruby

I get this error:
xcrun: error: invalid active developer path (/Applications/Xcode.app), missing xcrun at: /Applications/Xcode.app/usr/bin/xcrun
This solution works, but the error occurs again after closing my terminal and reopening it; I then have to run the same commands every time I open a new terminal window.
How can I apply these changes such that they will save after closing the terminal window out?
I started getting the same error after updating to OS X El Capitan.
In my case, all I did was to install it:
sudo xcode-select --install
And it works fine for me.
The steps below are for OS X 10.10 (Yosemite). Those experiencing this because of an upgrade to 10.11 (El Capitan) seem need to only run sudo xcode-select --install as described in the accepted answer.
I found a suggestion here which indicated
sudo xcode-select -switch /
as the fix. However, this threw an error that the developer path was invalid.
Instead, for me, I modified this to
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/
(which is a mixture of the two referenced link solutions) and this worked.
Try using
xcode-select --print-path
to find your developer path if /Applications/Xcode.app/Contents/Developer/ is still invalid for you.
I know this is quite old but I got the same issue and then I fixed it by doing couple more extra steps. Problem came when Terminal could not find the actual path of the Command Line Tools.
If you had Xcode and then removed it, then Terminal is referring to
the Command Line Tools inside the Xcode folder. Try using this
command and check what your path is, xcode-select --print-path. This would most likely print /Applications/Xcode.app/Contents/Developer.
Now to fix this, reinstall the command line tools for xcode. Initially remove any previous installations using sudo rm -rf /Library/Developer/CommandLineTools.
Then install the command line tools sudo xcode-select --install
Now the final step, change the path for the CLT to the actual path using sudo xcode-select -switch /Library/Developer/CommandLineTools/ this will fix it.
I resolved the issue with the below steps.
Xcode -> Preferences -> Locations -> Command Line Tools -> Select the command tool matching your Xcode version.
I started getting the same error after i update macOS Mojave to macOS Catalina.
I just installed few command lines in Terminal,
$ sudo gemĀ install cocoapods
$ sudo xcode-select --install
$ chsh -s /bin/zsh
Then, goto Xcode -> Preferences -> Locations -> Command Line Tools and confirm you have current Xcode version selected there.
For me the solution was as easy as reinstalling Xcode.
It was pointed out here: https://superuser.com/a/981126
You can (re)install Xcode via command line like the answer above suggest, or directly from the App Store.
I too had the same issue after upgrading to OS X EI Captian. I just installed xcode-select using sudo xcode-select --install
sudo xcode-select -switch / works for me.
Partial diagnosis: https://github.com/microsoft/vcpkg/issues/8781#issuecomment-547248760
It seems that upgrading from one MacOS version to another either uninstalls some dev tools or it moves them to another path, and this breaks compatibility with any tool using the environment variable that points to the old location where the tools were located.
sudo xcode-select --install
Using the install command worked for me, but it is not clear whether this simply downloaded and unpacked files and then skipped installation and simply updated an environment variable or whether it physically installed the files at the expected path. (Or it could have made links to the new folder path).
Testing my theory, I probe the folder structure with ls (I should have done this before using the install command):
rej#Ryans-MacBook-Air:~$ ls /Library/Developer/CommandLineTools/usr/bin/
rej#Ryans-MacBook-Air:~$ ls -la /Library/Developer/CommandLineTools/usr/bin/
total 243776
drwxr-xr-x 124 root wheel 3.9K Oct 28 23:03 ./
drwxr-xr-x 7 root admin 224B Oct 28 23:05 ../
lrwxr-xr-x 1 root wheel 64B Oct 28 23:03 2to3# -> ../../Library/Frameworks/Python3.framework/Versions/3.7/bin/2to3
lrwxr-xr-x 1 root wheel 68B Oct 28 23:03 2to3-3.7# -> ../../Library/Frameworks/Python3.framework/Versions/3.7/bin/2to3-3.7
-rwxr-xr-x 1 root wheel 116K Sep 5 22:51 DeRez*
-rwxr-xr-x 1 root wheel 31K Sep 5 22:51 GetFileInfo*
-rwxr-xr-x 1 root wheel 33K Sep 5 22:51 ResMerger*
-rwxr-xr-x 1 root wheel 126K Sep 5 22:51 Rez*
-rwxr-xr-x 1 root wheel 31K Sep 5 22:51 SetFile*
-rwxr-xr-x 1 root wheel 32K Sep 5 22:51 SplitForks*
-rwxr-xr-x 1 root wheel 41K Sep 5 22:51 ar*
-rwxr-xr-x 1 root wheel 40K Sep 5 22:51 as*
-rwxr-xr-x 1 root wheel 27K Sep 5 22:51 asa*
-rwxr-xr-x 1 root wheel 216K Sep 5 22:51 bison*
-rwxr-xr-x 1 root wheel 159K Sep 5 22:51 bitcode_strip*
lrwxr-xr-x 1 root wheel 5B Oct 28 23:03 c++# -> clang
-rwxr-xr-x 1 root admin 31K Sep 5 22:51 c89*
-rwxr-xr-x 1 root admin 31K Sep 5 22:51 c99*
lrwxr-xr-x 1 root wheel 5B Oct 28 23:03 cc# -> clang
-rwxr-xr-x 1 root wheel 80M Sep 5 22:51 clang*
lrwxr-xr-x 1 root wheel 5B Oct 28 23:03 clang++# -> clang
-rwxr-xr-x 1 root wheel 125K Sep 5 22:51 cmpdylib*
-rwxr-xr-x 1 root wheel 154K Sep 5 22:51 codesign_allocate*
lrwxr-xr-x 1 root wheel 17B Oct 28 23:03 codesign_allocate-p# -> codesign_allocate
-rwxr-xr-x 1 root admin 3.3K Aug 16 06:55 cpp*
-rwxr-xr-x 1 root wheel 36K Sep 5 22:51 ctags*
-rwxr-xr-x 1 root wheel 150K Sep 5 22:51 ctf_insert*
-rwxr-xr-x 1 root wheel 30M Sep 5 22:51 dsymutil*
lrwxr-xr-x 1 root wheel 14B Oct 28 23:03 dwarfdump# -> llvm-dwarfdump
-rwxr-xr-x 1 root wheel 477K Sep 5 22:51 dwarfdump-classic*
-rwxr-xr-x 1 root wheel 211K Sep 5 22:51 dyldinfo*
-rwxr-xr-x 1 root wheel 239B Sep 5 19:18 easy_install-3.7*
-rwxr-xr-x 1 root wheel 572K Sep 5 22:51 flex*
-rwxr-xr-x 1 root wheel 572K Sep 5 22:51 flex++*
lrwxr-xr-x 1 root wheel 3B Oct 28 23:03 g++# -> gcc
-rwxr-xr-x 1 root wheel 101K Aug 16 07:31 gatherheaderdoc*
-rwxr-xr-x 1 root admin 27K Sep 5 22:51 gcc*
lrwxr-xr-x 1 root wheel 8B Oct 28 23:03 gcov# -> llvm-cov
-rwxr-xr-x 1 root wheel 2.4M Sep 5 22:51 git*
lrwxr-xr-x 1 root wheel 3B Oct 28 23:03 git-receive-pack# -> git
-rwxr-xr-x 1 root wheel 1.4M Sep 5 22:51 git-shell*
lrwxr-xr-x 1 root wheel 3B Oct 28 23:03 git-upload-archive# -> git
lrwxr-xr-x 1 root wheel 3B Oct 28 23:03 git-upload-pack# -> git
-rwxr-xr-x 1 root wheel 148K Sep 5 22:51 gm4*
-rwxr-xr-x 1 root wheel 166K Sep 5 22:51 gnumake*
-rwxr-xr-x 1 root wheel 98K Sep 5 22:51 gperf*
-rwxr-xr-x 1 root wheel 33K Sep 5 22:51 hdxml2manxml*
-rwxr-xr-x 1 root wheel 158K Aug 16 07:31 headerdoc2html*
-rwxr-xr-x 1 root wheel 73K Sep 5 22:51 indent*
-rwxr-xr-x 1 root wheel 142K Sep 5 22:51 install_name_tool*
-rwxr-xr-x 1 root wheel 2.5M Sep 5 22:51 ld*
-rwxr-xr-x 1 root wheel 230B Aug 16 07:13 lex*
-rwxr-xr-x 1 root wheel 163K Sep 5 22:51 libtool*
-rwxr-xr-x 1 root wheel 73K Sep 5 22:51 lipo*
-rwxr-xr-x 1 root wheel 332K Sep 5 22:51 lldb*
-rwxr-xr-x 1 root wheel 3.6M Sep 5 22:51 llvm-cov*
-rwxr-xr-x 1 root wheel 7.9M Sep 5 22:51 llvm-dwarfdump*
-rwxr-xr-x 1 root wheel 9.8M Sep 5 22:51 llvm-nm*
-rwxr-xr-x 1 root wheel 11M Sep 5 22:51 llvm-objdump*
-rwxr-xr-x 1 root wheel 40K Sep 5 22:51 llvm-otool*
-rwxr-xr-x 1 root wheel 1.6M Sep 5 22:51 llvm-profdata*
-rwxr-xr-x 1 root wheel 2.9M Sep 5 22:51 llvm-size*
-rwxr-xr-x 1 root wheel 3.5K Aug 16 07:19 lorder*
-rwxr-xr-x 1 root wheel 148K Sep 5 22:51 m4*
-rwxr-xr-x 1 root wheel 166K Sep 5 22:51 make*
-rwxr-xr-x 1 root wheel 7.7K Aug 16 07:16 mig*
lrwxr-xr-x 1 root wheel 7B Oct 28 23:03 nm# -> llvm-nm
-rwxr-xr-x 1 root wheel 142K Sep 5 22:51 nm-classic*
-rwxr-xr-x 1 root wheel 171K Sep 5 22:51 nmedit*
lrwxr-xr-x 1 root wheel 12B Oct 28 23:03 objdump# -> llvm-objdump
lrwxr-xr-x 1 root wheel 10B Oct 28 23:03 otool# -> llvm-otool
-rwxr-xr-x 1 root wheel 644K Sep 5 22:51 otool-classic*
-rwxr-xr-x 1 root wheel 138K Sep 5 22:51 pagestuff*
-rwxr-xr-x 1 root wheel 221B Sep 5 19:18 pip3*
-rwxr-xr-x 1 root wheel 221B Sep 5 19:18 pip3.7*
-rwxr-xr-x 1 root wheel 32K Sep 5 22:51 projectInfo*
lrwxr-xr-x 1 root wheel 66B Oct 28 23:03 pydoc3# -> ../../Library/Frameworks/Python3.framework/Versions/3.7/bin/pydoc3
lrwxr-xr-x 1 root wheel 68B Oct 28 23:03 pydoc3.7# -> ../../Library/Frameworks/Python3.framework/Versions/3.7/bin/pydoc3.7
lrwxr-xr-x 1 root wheel 67B Oct 28 23:03 python3# -> ../../Library/Frameworks/Python3.framework/Versions/3.7/bin/python3
lrwxr-xr-x 1 root wheel 74B Oct 28 23:03 python3-config# -> ../../Library/Frameworks/Python3.framework/Versions/3.7/bin/python3-config
lrwxr-xr-x 1 root wheel 69B Oct 28 23:03 python3.7# -> ../../Library/Frameworks/Python3.framework/Versions/3.7/bin/python3.7
lrwxr-xr-x 1 root wheel 76B Oct 28 23:03 python3.7-config# -> ../../Library/Frameworks/Python3.framework/Versions/3.7/bin/python3.7-config
lrwxr-xr-x 1 root wheel 70B Oct 28 23:03 python3.7m# -> ../../Library/Frameworks/Python3.framework/Versions/3.7/bin/python3.7m
lrwxr-xr-x 1 root wheel 77B Oct 28 23:03 python3.7m-config# -> ../../Library/Frameworks/Python3.framework/Versions/3.7/bin/python3.7m-config
lrwxr-xr-x 1 root wheel 66B Oct 28 23:03 pyvenv# -> ../../Library/Frameworks/Python3.framework/Versions/3.7/bin/pyvenv
lrwxr-xr-x 1 root wheel 70B Oct 28 23:03 pyvenv-3.7# -> ../../Library/Frameworks/Python3.framework/Versions/3.7/bin/pyvenv-3.7
lrwxr-xr-x 1 root wheel 7B Oct 28 23:03 ranlib# -> libtool
-rwxr-xr-x 1 root wheel 70K Sep 5 22:51 resolveLinks*
-rwxr-xr-x 1 root wheel 85K Sep 5 22:51 rpcgen*
-rwxr-xr-x 1 root wheel 56K Sep 5 22:51 segedit*
lrwxr-xr-x 1 root wheel 12B Oct 28 23:03 size# -> size-classic
-rwxr-xr-x 1 root wheel 125K Sep 5 22:51 size-classic*
-rwxr-xr-x 1 root admin 138K Sep 5 22:51 stapler*
-rwxr-xr-x 1 root wheel 126K Sep 5 22:51 strings*
-rwxr-xr-x 1 root wheel 179K Sep 5 22:51 strip*
-rwxr-xr-x 1 root wheel 330K Sep 5 22:51 svn*
-rwxr-xr-x 1 root wheel 118K Sep 5 22:51 svnadmin*
-rwxr-xr-x 1 root wheel 105K Sep 5 22:51 svnbench*
-rwxr-xr-x 1 root wheel 64K Sep 5 22:51 svndumpfilter*
-rwxr-xr-x 1 root wheel 71K Sep 5 22:51 svnfsfs*
-rwxr-xr-x 1 root wheel 98K Sep 5 22:51 svnlook*
-rwxr-xr-x 1 root wheel 70K Sep 5 22:51 svnmucc*
-rwxr-xr-x 1 root wheel 89K Sep 5 22:51 svnrdump*
-rwxr-xr-x 1 root wheel 122K Sep 5 22:51 svnserve*
-rwxr-xr-x 1 root wheel 90K Sep 5 22:51 svnsync*
-rwxr-xr-x 1 root wheel 44K Sep 5 22:51 svnversion*
-rwxr-xr-x 1 root wheel 90M Sep 5 22:51 swift*
lrwxr-xr-x 1 root wheel 5B Oct 28 23:03 swift-autolink-extract# -> swift
-rwxr-xr-x 1 root admin 6.1M Sep 5 22:51 swift-build*
-rwxr-xr-x 1 root admin 734K Sep 5 22:51 swift-build-tool*
-rwxr-xr-x 1 root wheel 687K Sep 5 22:51 swift-demangle*
lrwxr-xr-x 1 root wheel 5B Oct 28 23:03 swift-format# -> swift
-rwxr-xr-x 1 root admin 6.1M Sep 5 22:51 swift-package*
-rwxr-xr-x 1 root admin 6.1M Sep 5 22:51 swift-run*
-rwxr-xr-x 1 root wheel 61K Sep 5 22:51 swift-stdlib-tool*
-rwxr-xr-x 1 root admin 6.1M Sep 5 22:51 swift-test*
lrwxr-xr-x 1 root wheel 5B Oct 28 23:03 swiftc# -> swift
-rwxr-xr-x 1 root wheel 12M Sep 5 22:51 tapi*
-rwxr-xr-x 1 root wheel 41K Sep 5 22:51 unifdef*
-rwxr-xr-x 1 root wheel 2.9K Aug 16 07:19 unifdefall*
-rwxr-xr-x 1 root wheel 63K Sep 5 22:51 unwinddump*
-rwxr-xr-x 1 root wheel 49K Sep 5 22:51 vtool*
-rwxr-xr-x 1 root wheel 45K Sep 5 22:51 xml2man*
-rwxr-xr-x 1 root wheel 135B Aug 16 07:22 yacc*
It is apparent that the files are physically located at that folder location and the installer installed missing components. The fact that MacOS's upgrade process uninstalls my development environment is unfriendly and Apple should be reprimanded.
I had faced the same issue when i removed one of the two Xcode installed.
I have solve this issue by Switching the path using terminal like below
$ sudo xcode-select --switch (drag Xcode here to get a path)
e.g sudo xcode-select --switch /Applications/Xcode\ 10.1.app
I got a similar error running Homebrew for the first time after upgrading from macOS Mojave v10.14 to Catalina v10.15.
It's never a good idea to run commands without understanding what's wrong with your installation of Homebrew and what the commands actually do. Your first and best option is to run brew doctor. This command will not only tell you if something is wrong but also how to fix the problem. In my case it showed:
Warning: Your Xcode is configured with an invalid path.
You should change it to the correct path:
sudo xcode-select -switch /Applications/Xcode.app
Once you fix the problem(s), run brew doctor again. Basically, repeat the process until you get the all clear message.
In some cases, you get something like:
Unbrewed dylibs/header files/static libraries were found in /usr/local/....
This will happen if you've installed software outside Homebrew that also use the same location to store their files. In many cases, it's safe to ignore these warnings.

Resources