How can I uninstall dotnet core from macOS Sierra - .net-core

I have tried to install dotnet core, but it does not worked. So, I would like to uninstall it and start refresh. How can I uninstall dotnet core from macOS Sierra(10.12.3).
you can find below, existing dotnet core info on the system
/usr/local/share/dotnet/sdk$ ls -la
total 0
drwxr-xr-x 4 root wheel 136 May 20 18:28 .
drwxr-xr-x 10 root wheel 340 May 20 20:44 ..
drwxr-xr-x 142 root wheel 4828 May 20 20:44 1.0.4
drwxr-xr-x 121 root wheel 4114 May 9 23:04 2.0.0-preview1-005977
/usr/local/share/dotnet/sdk$ sudo find / -name dotnet
find: /dev/fd/sdk: No such file or directory
find: /dev/fd/sdk: No such file or directory
/private/etc/paths.d/dotnet
/Users/melihtt/.dotnet/NuGetFallbackFolder/microsoft.codeanalysis.analyzers/1.1.0/analyzers/dotnet
/Users/melihtt/.dotnet/optimizationdata/2.0.0-preview1-005977/osx.10.12-x64/dotnet
/usr/local/share/dotnet
/usr/local/share/dotnet/dotnet
/usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.0.5/dotnet
/usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.1.2/dotnet

To uninstall dotnet core from macOS:
download dotnet-uninstall-pkgs.sh from https://github.com/dotnet/sdk/blob/main/scripts/obtain/uninstall/dotnet-uninstall-pkgs.sh
make dotnet-uninstall-pkgs.sh executable
execute dotnet-uninstall-pkgs.sh as root (requires superuser privileges to run).
curl -O https://raw.githubusercontent.com/dotnet/sdk/main/scripts/obtain/uninstall/dotnet-uninstall-pkgs.sh
chmod u+x dotnet-uninstall-pkgs.sh
sudo ./dotnet-uninstall-pkgs.sh

If you are using the M1 Mac
Confirm your cpu architecture
ls /usr/local/share/dotnet/
This may be x64 or x86. Set a variable to store the cpu arch
arch="x64"
Confirm your dotnet version
dotnet --version
Set a variable to store the version
version="5.0.403"
Run the following commands
sudo rm -rf /usr/local/share/dotnet/$arch/sdk/$version
sudo rm -rf /usr/local/share/dotnet/$arch/shared/Microsoft.NETCore.App/$version
sudo rm -rf /usr/local/share/dotnet/$arch/shared/Microsoft.AspNetCore.All/$version
sudo rm -rf /usr/local/share/dotnet/$arch/shared/Microsoft.AspNetCore.App/$version
sudo rm -rf /usr/local/share/dotnet/$arch/host/fxr/$version
Some of the above folders may not exist but that is fine. Confirm that no dotnet sdk is still present
ls /usr/local/share/dotnet/$arch/sdk/
dotnet --version

To uninstall dotnet core from MacOS, using dotnet-uninstall-tool.
Download the tool Here
Open terminal and change working directory to where the file (dotnet-core-uninstall.tar.gz) is located.
Install the Tool using following commands.
1. mkdir -p ~/dotnet-core-uninstall
2. tar -zxf dotnet-core-uninstall.tar.gz -C ~/dotnet-core-uninstall
3. cd ~/dotnet-core-uninstall
show help: ./dotnet-core-uninstall -h
./dotnet-core-uninstall list
Using this command you can check the list of .NET Core SDKS or Runtime that can be removed with this tool.
./dotnet-core-uninstall remove --sdk/--runtime version --force
Eg: For remove SDK 5.0.100
./dotnet-core-uninstall remove --sdk 5.0.100 --force
If you face any Privilege issue add sudo in front of the command
Give the user Key (Password).
(Do you want to continue) hit the "Y" then enter.
Check & conform the SDK list

You might as well use dotnet-core-uninstall tool which allow you to select a specific SDK or runtime version to remove. github docs
If you are experiencing issues with building Xamarin.Mac after installing preview version of .Net 5 SDK you might like to remove Mono using such script and Visual Studio like this and try to reinstall from scratch
good luck

Related

Installing Meteor on Raspbian

I'm looking for a guide to installing Meteor, including NodeJS and MongoDB, on Raspbian. I have seen a couple of online articles, however, they are 3-4 years old.
Found the answer and posting it here for others who may have the same question.
Part of these instructions are from:
https://github.com/4commerce-technologies-AG/meteor
Install meteor for ARM processors on Raspbian:
cd $HOME
git clone --depth 1 https://github.com/4commerce-technologies-AG/meteor.git
$HOME/meteor/meteor --version
Create a symlink
cd /usr/bin
sudo ln -s $HOME/meteor/meteor meteor
Test your install
cd $HOME
meteor create hello-world
cd hello-world
meteor
Open your browser to http://localhost:3000 to see the app working.

Compile multiple dotnet core projects in one step using dotnet cli

Assuming this folder structure
SampleApp
global.json
Src
Web
project.json
Startup.cs
...
Model
project.json
Startup.cs
...
how does one compile both projects using dotnet? (from command line, not in visual studio)
If you run dotnet build at the root folder level you get
Could not find file .. project.json
I can see there is this outstanding enhancement on the CLI repo but that is from Feb2.
Any script would have to take dependencies into account before just blindly calling dotnet on all src sub-folders.
The dotnet build command accepts glob patterns. So you can do this:
dotnet build Src/**/project.json
There's no such a tool yet. Even KoreBuild, the tool that the ASP.NET team uses, goes blindly in each folder and invokes dotnet build/pack.
The nice thing is that dotnet build is now smart enough to not recompile the dependencies if they haven't changed, so that's not a problem anymore.
For linux I'm using:
for p in $(find . -name *.csproj); do dotnet build $p; done
I had a similar requirement. This is my workaround:
#echo off
for /D %%d in (*) do (
cd %%d
cd
dotnet restore
dotnet build
cd ..
)
exit /b
Use GNU Make. I use it to build my projects. all you have to do create a Makefile in your project root folder. You can nest Makefiles in directories and have a Top Level Makefile that runs the subdirectories. then you set up Makefiles for each of your "Sub Projects" folders and run any comandline tool. with dotnet core is is dotnet .
Wait... GNU - "GNU is not Unix" that's a Unix/Linux application... I run windows. Well the good news is you can do this is in windows. I'm using make.exe through my git-bash installation (git for windows). You will have to go find the cygwin port of make. (google: "make for git-bash") Then install it to your bin directory under the cygwin folder. You could also just install cygwin if you really wanted to.
The nice thing about using Gnu-Make is it is universal. Since dotnet core is platform agnostic, every environment Mac/FreeBSD/Linux have "make" most likely already installed. Adding it to your Windows machine and projects to me makes a lot of sense. Since you project can now be built by everyone the same way.
some of my projects need to build docker containers with dockerfiles, or snap packages, deploy to test, etc... Make (pardon the pun) makes it easy.
Here is a sample of simple projects Makefile. Running 'make' by itself is like saying 'make all' you could set up a command like 'cd ./subdir; make' as one of your .phoney directives. (Google: "Makefile documentation")
project_drive?=/c/prj
nuget_repo_name?=Local_Nuget_Packages
local_nuget_dir?=$(project_drive)/$(nuget_repo_name)
RELEASE_VERSION:= `grep "<Version>" *.csproj | cut -d '>' -f 2 | cut -d '<' -f 1`
.PHONEY: clean release test doc nuget install debug_nuget debug_install
all: doc MSBuild
test:
./test.sh
MSBuild:
dotnet build
clean:
dotnet clean; dotnet restore
release:
dotnet build -c Release
doc:
doxygen ./Doxyfile.config
nuget: release
dotnet pack -c Release
install:
cp ./bin/Release/*.$(RELEASE_VERSION).nupkg $(local_nuget_dir)
debug_nuget: MSBuild
dotnet pack
debug_install:
cp ./bin/debug/*.$(RELEASE_VERSION).nupkg $(local_nuget_dir)
What's missing is that you can also use the commands on project.sln files if you do not have project.json
dotnet build src/**/project.json
-- or --
dotnet build src/project.sln
same goes for dotnet test

How to install wkhtmltopdf patched qt without compiling?

I'm using google cloud instance for host Odoo, somo reports print to pdf ok, but other with custom paperformat get the following error:
"The switch --header-spacing, is not support using unpatched qt, and will be ignored.The switch --header-html, is not support using unpatched qt, and will be ignored.The switch --footer-html, is not support using unpatched qt, and will be ignored.QXcbConnection: Could not connect to display"
I google it, and to solve I need to compile wkhtmltopdf like this:
http://www.grobak.net/id/blog/how-fix-wkhtmltopdf-failed-error-code-6 but this proccess need 3 hs and I'm building a script to install google instances on the run with odoo dependencies.
the .deb package have a dependency broken
Anyone know other solution?
My system configuration is Ubuntu 14.04 and 64 bit. So, i am downloading according to that.
First you have to check your system OS name by
lsb_release -a
Check to see if your Ubuntu Linux operating system architecture is 32-bit or 64-bit, open up a terminal and run the following command below.
file /sbin/init
Download wkhtmltopdf patched with qt using below command
sudo wget -P Downloads https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb
Here, replace "trusty" with your OS name and if 64 bit only then keep "amd64" like that , otherwise change it to "i386" and down load the deb file.
After that execute the following commands,
cd ~/Downloads
sudo dpkg -i wkhtmltox-0.12.1_linux-trusty-amd64.deb
Now, check wkhtmltopdf version with below command,
wkhtmltopdf -V
Enjoy!!
After trying many ways I finally made it work.
First I removed all my previous installation by
sudo apt-get remove --purge wkhtmltopdf
sudo apt-get autoremove
Then I opened wkhtmltopdf.org and navigated into their Downloads > Archive. In Archive section I downloaded 0.12.1 .deb version by
wget <copy the link from website for the.deb file and paste it in terminal here>.
sudo dpkg -i <package name>
sudo cp /usr/local/bin/wkhtmltopdf /usr/bin
This is because odoo looks for wkhtmltopdf in /usr/bin directory otherwise gives IOError. I also set my webkit_path parameter in Odoo System Parameters to /usr/bin.
Thats it. Hope this helps
I was facing same issue with wkhtmltopdf 0.12.4
installed new version of wkhtmltopdf 0.12.6-1
follow below commands to install wkhtmltopdf 0.12.6-1
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.centos7.x86_64.rpm
yum localinstall wkhtmltox-0.12.6-1.centos7.x86_64.rpm #centos specific command

Deployment of play 2.2.3 application in glassfish 3.1

I tried to build a war for play 2.2.3 application to deploy in glassfish server using play2war plugin. I followed the steps in
https://github.com/play2war/play2-war-plugin/wiki/Configuration.
But its not worked.
How to deploy play 2.2.3 application in glassfish server 3.1. Please help..
There seems to be compatibility issue of Play 2.2.3 using play2war deployment on Glassfish 3. I get error as below:
Exception: java.lang.ClassCircularityError thrown from the UncaughtExceptionHandler in thread "Grizzly-kernel-thread(1)"
Sorry I do not know the fix, but using the same war deploys fine on Glassfish 4
For Play2War, it runs the best on Apache tomcat servers based on my simple tests
To install play framework on glassfish (3 or 4) follow step by step the ssh codes:
For glassfish home dir /your_path/glassfish4/glassfish/domains/domain1/lib/
1) Download and unzip glassfish:
unzip glassfish-4.1*zip
rm -rf rm -rf glassfish-4.1.zip
2) Download and Unzip Play framework (jars)
unzip play-2.2.6.zip
rm -rf play-2.2.6.zip
3) Extract it to your glassfish domain lib dir:
find play-2.2.6/repository/local/ '*.jar' -exec cp -vuni '{}'
"glassfish4/glassfish/domains/domain1/lib/" ";"
find play-2.2.6/repository/local/ -iname *.jar -exec cp {} glassfish4/glassfish/domains/domain1/lib/ \;
rm -rf play-2.2.6
4) Download new activator to create new application.conf file:
unzip typesafe-activator-1.2.12-minimal.zip
rm -rf typesafe-activator-1.2.12-minimal.zip
cd activator-1.2.12-minimal
./activator new sport-api play-scala
cd ..
5) Stop and start your glassfish
glassfish4/glassfish/bin/asadmin stop-domain
glassfish4/glassfish/bin/asadmin start-domain
6) Add custom variable to glassfish:
glassfish4/glassfish/bin/asadmin create-jvm-options -Dconfig.file=/your_path/sport-api/conf/application.conf
7) Done! Deploy your .war file using play framework features.
Obs: You can download this project "play 4 glassfish" with custom sh installer for glassfish 4.1. More features for future.
https://github.com/rbsdev/play4glassfish.git

Issue when installing Oracle 11G in Ubuntu 12.04 LTS

I am following the instruction to install Oracle 11G in Ubuntu 12.04 LTS (x64) from this web page
Oracle 11g also needs libstdc++5 in 32bits version that is not provided with Ubuntu Pangolin, So I follow these instructions:
mkdir /tmp/libstdc++5
cd /tmp/libstdc++5
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.6-17ubuntu1_amd64.deb
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.6-17ubuntu1_i386.deb
sudo dpkg --force-architecture -i libstdc++5_3.3.6-17ubuntu1_i386.deb
sudo mv /usr/lib/libstdc++.so.5* /usr/lib32/
But when executing this command:
sudo dpkg -i libstdc++5_3.3.6-17ubuntu1_amd64.deb
I get this error:
dpkg: error al procesar libstdc++5_3.3.6-17ubuntu1_amd64.deb (--install):
libstdc++5: 1:3.3.6-17ubuntu1 (Multi-Arch: no) is not co-installable with libstdc++5:i386 1:3.3.6-17ubuntu1 (Multi-Arch: no) which is currently installed
Se encontraron errores al procesar:
libstdc++5_3.3.6-17ubuntu1_amd64.deb
How should I deal this installation problem?
There is a few ways of going about this to fix it. I am not using a pentium processor, so i did not worry about that particular package model. Some of the 11gR2 make files are for older versions of the linux kernel, so the gcc compilers are also older.
Lets think it out, Oracle Enterprise is based off Red Hat. The newest version of the kernel, 'out-the-box', on Red Hat 5 was like ~ 2.6 maybe?!. So the files are gonna use a gcc version that was relative to the kernel at the time. Red Hat, unlike its daughter project Fedora, is a fairly slow evolving creature in terms of kernel version.
I have used the libstc++5_3.3.6-25.deb packages (i386 and amd64). That particular package set (3.3.6-17) is for the i686 P6 micro-architecture. Which is the Intel Pentium class of cpu's.
I do not know what you are using 11g on, or for, but the packages I have listed will work if your CPU is not a Pentium. Ive used the enterprise manager, the database, sqlplus, and SQL Developer. I even downloaded Data Modeler and use it. But thats another 5,000 words of details on how to get that puppy running. Back to the question at hand:
If not already done; create the Oracle user, and the dba, oper, and oinstall groups.
Give the /mnt_pt/././ directory to the oracle user and oinstall group with -R privleges
~$ sudo mkdir -p /mnt_pt/app (i.e. opt directory is used frequently or create one)
~$ sudo useradd -g oinstall -G dba -d /mnt_pt/app -s /bin/bash oracle
~$ sudo passwd oracle
~$ sudo chown -R oracle:oinstall /mnt_pt/app
3.1 download the synaptic package manager. $ sudo apt-get install synaptic -y
3.2 download mlocate (should be installed) $ sudo apt-get install mlocate -y
4.1 Go to the User and User Groups app: SystemSettings>users and accounts. Set the oracle account type to administrator.
4.2 Log out of your account, enter the oracle account.
4.3 From the oracle account open Synaptic Package manager. Search for the libstdc++5 (3.3.6-25) files. DO NOT INSTALL THEM!!!!
4.4 Mark both packages from installation. DO NOT INSTALL THEM!!!
4.5 On the Package menu of the Synaptic app, disable the Automatically Install feature.
4.6 Open the File menu of synaptic, and select the Generate Script option and choose the directory you made as the save destination. (In your case /tmp/libstdc++5)
4.7 QUIT without apply changes.
5.1 Manually open the file you saved the script in. Right click the libstdc++5 script, and choose run in terminal.
5.2 This will deliver two .deb packages. Change your forcearch code from 3.3.6-17 to 3.3.6-25
6.1 Find out where the libraries (libstdc++.so.5) are by running the following code:
$ sudo updatedb
$ locate libstdc++.so.5 .......(the .so. stands for libraries)
6.2 Your looking for 5 and 5.07. now run the following lines of code to move it where you want them (file is the parent directory where they are stored)
sudo mv /file/lib/libstdc++.so.5* /usr/lib32/
I installed Fedora 19 just to try and see where I was making errors and if I could get those packages. It was a learning experience. That particular package set is for the i686 P6 micro-architecture. Which is a hard one to find! Fedora 19 is EXTREMELY SHARP but, I set out to use Ubuntu, so that's what I did!! By the way the hardest part comes after that!
Anymore questions let me know!
P.S. if you are using a pentium I advise you to do a second install with fedora, wget the packages from the noarch repository, transfer those to a usb, switch back to Ubuntu, and after installing alien and rpm, from the command-line run the alien command for the packages via the directory they are in (or right click the packages), and then do a dpkg-forcearchitecure.

Resources