How to uninstall aws-cdk - node-modules

which -a cdk
cdk is /usr/local/bin/cdk
cdk is /usr/local/bin/cdk
I am trying to uninstall it, but finding no luck.
(.env) [senthilx#88665a371033:~]$ npm uninstall aws-cdk -g
up to date in 0.021s
(.env) [senthilx#88665a371033:~]$ /usr/local/bin/npm uninstall aws-cdk -g
up to date, audited 1 package in 119ms
found 0 vulnerabilities
(.env) [senthilx#88665a371033:~]$ ls -l /usr/local/bin/cdk
lrwxr-xr-x 1 senthilx admin 35 May 27 15:22 /usr/local/bin/cdk -> ../lib/node_modules/aws-cdk/bin/cdk
Any troubleshooting steps?

Remove /usr/local/bin/cdk and then ../lib/node_modules/aws-cdk/bin/cdk.

Related

Install custom wheel file and dependencies offline [duplicate]

What's the best way to download a python package and it's dependencies from pypi for offline installation on another machine? Is there any easy way to do this with pip or easy_install? I'm trying to install the requests library on a FreeBSD box that is not connected to the internet.
On the system that has access to internet
The pip download command lets you download packages without installing them:
pip download -r requirements.txt
(In previous versions of pip, this was spelled pip install --download -r requirements.txt.)
On the system that has no access to internet
Then you can use
pip install --no-index --find-links /path/to/download/dir/ -r requirements.txt
to install those downloaded modules, without accessing the network.
If you want install python libs and their dependencies offline, finish following these steps on a machine with the same os, network connected, and python installed:
1) Create a requirements.txt file with similar content (Note - these are the libraries you wish to download):
Flask==0.12
requests>=2.7.0
scikit-learn==0.19.1
numpy==1.14.3
pandas==0.22.0
One option for creating the requirements file is to use pip freeze > requirements.txt. This will list all libraries in your environment. Then you can go in to requirements.txt and remove un-needed ones.
2) Execute command mkdir wheelhouse && pip download -r requirements.txt -d wheelhouse to download libs and their dependencies to directory wheelhouse
3) Copy requirements.txt into wheelhouse directory
4) Archive wheelhouse into wheelhouse.tar.gz with tar -zcf wheelhouse.tar.gz wheelhouse
Then upload wheelhouse.tar.gz to your target machine:
1) Execute tar -zxf wheelhouse.tar.gz to extract the files
2) Execute pip install -r wheelhouse/requirements.txt --no-index --find-links wheelhouse to install the libs and their dependencies
If the package is on PYPI, download it and its dependencies to some local directory.
E.g.
$ mkdir /pypi && cd /pypi
$ ls -la
-rw-r--r-- 1 pavel staff 237954 Apr 19 11:31 Flask-WTF-0.6.tar.gz
-rw-r--r-- 1 pavel staff 389741 Feb 22 17:10 Jinja2-2.6.tar.gz
-rw-r--r-- 1 pavel staff 70305 Apr 11 00:28 MySQL-python-1.2.3.tar.gz
-rw-r--r-- 1 pavel staff 2597214 Apr 10 18:26 SQLAlchemy-0.7.6.tar.gz
-rw-r--r-- 1 pavel staff 1108056 Feb 22 17:10 Werkzeug-0.8.2.tar.gz
-rw-r--r-- 1 pavel staff 488207 Apr 10 18:26 boto-2.3.0.tar.gz
-rw-r--r-- 1 pavel staff 490192 Apr 16 12:00 flask-0.9-dev-2a6c80a.tar.gz
Some packages may have to be archived into similar looking tarballs by hand. I do it a lot when I want a more recent (less stable) version of something. Some packages aren't on PYPI, so same applies to them.
Suppose you have a properly formed Python application in ~/src/myapp. ~/src/myapp/setup.py will have install_requires list that mentions one or more things that you have in your /pypi directory. Like so:
install_requires=[
'boto',
'Flask',
'Werkzeug',
# and so on
If you want to be able to run your app with all the necessary dependencies while still hacking on it, you'll do something like this:
$ cd ~/src/myapp
$ python setup.py develop --always-unzip --allow-hosts=None --find-links=/pypi
This way your app will be executed straight from your source directory. You can hack on things, and then rerun the app without rebuilding anything.
If you want to install your app and its dependencies into the current python environment, you'll do something like this:
$ cd ~/src/myapp
$ easy_install --always-unzip --allow-hosts=None --find-links=/pypi .
In both cases, the build will fail if one or more dependencies aren't present in /pypi directory. It won't attempt to promiscuously install missing things from Internet.
I highly recommend to invoke setup.py develop ... and easy_install ... within an active virtual environment to avoid contaminating your global Python environment. It is (virtualenv that is) pretty much the way to go. Never install anything into global Python environment.
If the machine that you've built your app has same architecture as the machine on which you want to deploy it, you can simply tarball the entire virtual environment directory into which you easy_install-ed everything. Just before tarballing though, you must make the virtual environment directory relocatable (see --relocatable option). NOTE: the destination machine needs to have the same version of Python installed, and also any C-based dependencies your app may have must be preinstalled there too (e.g. say if you depend on PIL, then libpng, libjpeg, etc must be preinstalled).
Let me go through the process step by step:
On a computer connected to the internet, create a folder.
$ mkdir packages
$ cd packages
open up a command prompt or shell and execute the following command:
Suppose the package you want is tensorflow
$ pip download tensorflow
Now, on the target computer, copy the packages folder and apply the following command
$ cd packages
$ pip install 'tensorflow-xyz.whl' --no-index --find-links '.'
Note that the tensorflow-xyz.whl must be replaced by the original name of the required package.
offline python. for doing this I use virtualenv (isolated Python environment)
1) install virtualenv
online with pip:
pip install virtualenv --user
or offline with whl: go to this link , download last version (.whl or tar.gz) and install that with this command:
pip install virtualenv-15.1.0-py2.py3-none-any.whl --user
by using --user you don't need to use sudo pip….
2) use virtualenv
on online machine select a directory with terminal cd and run this code:
python -m virtualenv myenv
cd myenv
source bin/activate
pip install Flask
after installing all the packages, you have to generate a requirements.txt so while your virtualenv is active, write
pip freeze > requirements.txt
open a new terminal and create another env like myenv2.
python -m virtualenv myenv2
cd myenv2
source bin/activate
cd -
ls
now you can go to your offline folder where your requirements.txt and tranferred_packages folder are in there. download the packages with following code and put all of them to tranferred_packages folder.
pip download -r requirements.txt
take your offline folder to offline computer and then
python -m virtualenv myenv2
cd myenv2
source bin/activate
cd -
cd offline
pip install --no-index --find-links="./tranferred_packages" -r requirements.txt
what is in the folder offline [requirements.txt , tranferred_packages {Flask-0.10.1.tar.gz, ...}]
check list of your package
pip list
note: as we are in 2017 it is better to use python 3. you can create python 3 virtualenv with this command.
virtualenv -p python3 envname
I had a similar problem. And i had to make it install the same way, we do from pypi.
I did the following things:
Make a directory to store all the packages in the machine that have internet access.
mkdir -p /path/to/packages/
Download all the packages to the path
Edit: You can also try:
python3 -m pip wheel --no-cache-dir -r requirements.txt -w /path/to/packages
pip download -r requirements.txt -d /path/to/packages
Eg:- ls /root/wheelhouse/ # **/root/wheelhouse** is my **/path/to/packages/**
total 4524
-rw-r--r--. 1 root root 16667 May 23 2017 incremental-17.5.0-py2.py3-none-any.whl
-rw-r--r--. 1 root root 34713 Sep 1 10:21 attrs-18.2.0-py2.py3-none-any.whl
-rw-r--r--. 1 root root 3088398 Oct 15 14:41 Twisted-18.9.0.tar.bz2
-rw-r--r--. 1 root root 133356 Jan 28 15:58 chardet-3.0.4-py2.py3-none-any.whl
-rw-r--r--. 1 root root 154154 Jan 28 15:58 certifi-2018.11.29-py2.py3-none-any.whl
-rw-r--r--. 1 root root 57987 Jan 28 15:58 requests-2.21.0-py2.py3-none-any.whl
-rw-r--r--. 1 root root 58594 Jan 28 15:58 idna-2.8-py2.py3-none-any.whl
-rw-r--r--. 1 root root 118086 Jan 28 15:59 urllib3-1.24.1-py2.py3-none-any.whl
-rw-r--r--. 1 root root 47229 Jan 28 15:59 tqdm-4.30.0-py2.py3-none-any.whl
-rw-r--r--. 1 root root 7922 Jan 28 16:13 constantly-15.1.0-py2.py3-none-any.whl
-rw-r--r--. 1 root root 164706 Jan 28 16:14 zope.interface-4.6.0-cp27-cp27mu-manylinux1_x86_64.whl
-rw-r--r--. 1 root root 573841 Jan 28 16:14 setuptools-40.7.0-py2.py3-none-any.whl
-rw-r--r--. 1 root root 37638 Jan 28 16:15 Automat-0.7.0-py2.py3-none-any.whl
-rw-r--r--. 1 root root 37905 Jan 28 16:15 hyperlink-18.0.0-py2.py3-none-any.whl
-rw-r--r--. 1 root root 52311 Jan 28 16:15 PyHamcrest-1.9.0-py2.py3-none-any.whl
-rw-r--r--. 1 root root 10586 Jan 28 16:15 six-1.12.0-py2.py3-none-any.whl
Tar the packages directory and copy it to the Machine that doesn't have internet access. Then do,
cd /path/to/packages/
tar -cvzf packages.tar.gz . # not the . (dot) at the end
Copy the packages.tar.gz into the destination machine that doesn't have internet access.
In the machine that doesn't have internet access, do the following (Assuming you copied the tarred packages to /path/to/package/ in the current machine)
cd /path/to/packages/
tar -xvzf packages.tar.gz
mkdir -p $HOME/.config/pip/
vi $HOME/.config/pip/pip.conf
and paste the following content inside and save it.
[global]
timeout = 10
find-links = file:///path/to/package/
no-cache-dir = true
no-index = true
Finally, i suggest you use, some form of virtualenv for installing the packages.
virtualenv -p python2 venv # use python3, if you are on python3
source ./venv/bin/activate
pip install <package>
You should be able to download all the modules that are in the directory /path/to/package/.
Note: I only did this, because i couldn't add options or change the way we install the modules. Otherwise i'd have done
pip install --no-index --find-links /path/to/download/dir/ -r requirements.txt
Download the tarball, transfer it to your FreeBSD machine and extract it, afterwards run python setup.py install and you're done!
EDIT: Just to add on that, you can also install the tarballs with pip now.
Using wheel compiled packages.
bundle up:
$ tempdir=$(mktemp -d /tmp/wheelhouse-XXXXX)
$ pip wheel -r requirements.txt --wheel-dir=$tempdir
$ cwd=`pwd`
$ (cd "$tempdir"; tar -cjvf "$cwd/bundled.tar.bz2" *)
copy tarball and install:
$ tempdir=$(mktemp -d /tmp/wheelhouse-XXXXX)
$ (cd $tempdir; tar -xvf /path/to/bundled.tar.bz2)
$ pip install --force-reinstall --ignore-installed --upgrade --no-index --no-deps $tempdir/*
Note wheel binary packages are not across machines.
More ref. here: https://pip.pypa.io/en/stable/user_guide/#installation-bundles
For Windows I have used below things
Internet Connection
1.Create directory with any name.I have created with "repo"
2.Download libraries using below command (it will download not install)
pip download libraray_name -d"C:\repo"
pip download openpyxl -d"C:\repo"
Then you will find multiple .whl extension files
copy all the filename in requirements.txt
No Internet Connection
Now Move this folder and files to PC where no internet connection and run the below command.
pip install -r requirements.txt --find-links=C:\repo --no-index
You can read the detailed blog Link
As a continues to #chaokunyang answer, I want to put here the script I write that does the work:
Write a "requirements.txt" file that specifies the libraries you want to pack.
Create a tar file that contains all your libraries (see the Packer script).
Put the created tar file in the target machine and untar it.
run the Installer script (which is also packed into the tar file).
"requirements.txt" file
docker==4.4.0
Packer side: file name: "create-offline-python3.6-dependencies-repository.sh"
#!/usr/bin/env bash
# This script follows the steps described in this link:
# https://stackoverflow.com/a/51646354/8808983
LIBRARIES_DIR="python3.6-wheelhouse"
if [ -d ${LIBRARIES_DIR} ]; then
rm -rf ${LIBRARIES_DIR}/*
else
mkdir ${LIBRARIES_DIR}
fi
pip download -r requirements.txt -d ${LIBRARIES_DIR}
files_to_add=("requirements.txt" "install-python-libraries-offline.sh")
for file in "${files_to_add[#]}"; do
echo "Adding file ${file}"
cp "$file" ${LIBRARIES_DIR}
done
tar -cf ${LIBRARIES_DIR}.tar ${LIBRARIES_DIR}
Installer side: file name: "install-python-libraries-offline.sh"
#!/usr/bin/env bash
# This script follows the steps described in this link:
# https://stackoverflow.com/a/51646354/8808983
# This file should run during the installation process from inside the libraries directory, after it was untared:
# pythonX-wheelhouse.tar -> untar -> pythonX-wheelhouse
# |
# |--requirements.txt
# |--install-python-libraries-offline.sh
pip3 install -r requirements.txt --no-index --find-links .
For Pip 8.1.2 you can use pip download -r requ.txt to download packages to your local machine.
Download the wheel file (for example dlb-0.5.0-py3-none-any.whl) from Pypi and
pip install dlb-0.5.0-py3-none-any.whl

Angular CLI ng command not found on Mac Os

I looked at the numerous posts on here regarding this issue and tried them but had no success resolving this.
I am on MacOS and here is what I have done so far based on recommendations I have found here but I still get this error
~~ sudo npm uninstall -g angular-cli
~~ sudo npm uninstall -g #angular/cli
~~ sudo npm cache clean --force
~~ sudo npm install -g #angular/cli
This outputs:
/usr/local/Cellar/node/11.10.0/bin/ng -> /usr/local/Cellar/node/11.10.0/lib/node_modules/#angular/cli/bin/ng
> #angular/cli#8.3.6 postinstall /usr/local/Cellar/node/11.10.0/lib/node_modules/#angular/cli
> node ./bin/postinstall/script.js
+ #angular/cli#8.3.6
added 245 packages from 185 contributors in 8.784s
However, issuing command below does not work:
~~ ng version
-bash: ng: command not found
Some people suggesting linking so I tried that as well:
~~ sudo npm link #angular/cli
, which outputs following:
/Users/dinob/node_modules/#angular/cli -> /usr/local/Cellar/node/11.10.0/lib/node_modules/#angular/cli
, but ng version is still not working:
~~ ng version
-bash: ng: command not found
Many posts suggest that there should be a directory .npm-global created under my /Users/dinob directory but I dont see it. I aonly see .npm directory, not .npm-global.
I also tried following:
uninstall angular as described above
brew update
brew upgrade node // this upgraded from 11.10.0 to 12.10.0
then repeat steps above to install angular/cli
still same problem, ng command not found
This is not a duplicate question as KenWhite suggests and I have reviewed all the posts on SO I could find (and more) regarding this issue, tried them and none of them solved the issue for me.
sudo npm install -g #angular/cli command completed and returned following paths but none of them #angular directory in them:
/usr/local/Cellar/node/11.10.0/bin/ng -> /usr/local/Cellar/node/11.10.0/lib/node_modules/#angular/cli/bin/ng
Above, there is no bin folder:
dinob # /usr/local/Cellar/node/11.10.0
~~ ls -la
total 80
drwxr-xr-x 8 dinob staff 256 2 Oct 11:30 ./
drwxr-xr-x 5 dinob staff 160 27 Sep 09:29 ../
-rw-r--r--# 1 dinob staff 8196 2 Oct 11:32 .DS_Store
-rw-r--r-- 1 dinob staff 26696 14 Feb 2019 README.md
drwxr-xr-x 3 dinob staff 96 14 Feb 2019 etc/
drwxr-xr-x 3 dinob staff 96 14 Feb 2019 include/
drwxr-xr-x 5 dinob staff 160 2 Oct 11:22 lib/
drwxr-xr-x 5 dinob staff 160 14 Feb 2019 share/
Same for this location > #angular/cli#8.3.6 postinstall /usr/local/Cellar/node/11.10.0/lib/node_modules/#angular/cli:
dinob # /usr/local/Cellar/node/11.10.0/lib/node_modules
~~ ls -la
total 16
drwxr-xr-x 6 dinob staff 192 2 Oct 11:22 ./
drwxr-xr-x 5 dinob staff 160 2 Oct 11:22 ../
-rw-r--r--# 1 dinob staff 6148 2 Oct 11:27 .DS_Store
drwxr-xr-x 7 root staff 224 26 Sep 16:42 n/
drwxr-xr-x 26 dinob staff 832 2 Oct 11:28 npm/
drwxr-xr-x 6 dinob staff 192 15 Jul 16:32 react-native-cli/
After days of googling and getting no help neither on here nor from #Angular github which is pretty much useless, was finally able to resolve the issue and get my angular ng command not found issue resolved following these steps:
1. Instal nvm
Issue these 3 commands to install nvm. (Angular documented steps https://angular.io/guide/setup-local to setup your environment did not work for me).
So I installed nvm like so:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
export NVM_DIR="/Users/your-user-name/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
After this, make sure you restart terminal and you should be able to issue nvm --version to see version of installed nvm.
2. Install node using nvm
nvm install stable
nvm install node
3. Finally, install angular
npm install -g #angular/cli
4. Restart terminal
Restart terminal and you should be able to use ng version to see version installed on your system
~~ ng version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 8.3.6
Node: 12.11.1
OS: darwin x64
Angular:
...
Package Version
------------------------------------------------------
#angular-devkit/architect 0.803.6
#angular-devkit/core 8.3.6
#angular-devkit/schematics 8.3.6
#schematics/angular 8.3.6
#schematics/update 0.803.6
rxjs 6.4.0
I can now create and start my project
ng new my-test-project
ng serve my-test project
I think SO should start getting serious about people down-voting questions or marking them as duplicates before reading them and even trying to understand what was asked and what the problem is.
It seems to be lots of people read the title and decide the fate of question just based on that and any disagreement ends up in blocking question entirely.
So much bias and hate on a site that is supposed to help.
Better alternatives are very much needed.
UPDATE
If you are like me and switched to use zsh shel instead of bash shell (since Catalina MacOs now uses zsh), you might have noticed that ng version has stopped working for you.
In that case, modify your .zshrc file by opening it in vim:
vi ~/.zshrc
In there, find this line:
source $ZSH/oh-my-zsh.sh
Underneath this line, add following line:
source /Users/Your-User-Name/.bash_profile
Save the file by hitting Esc key and typing :wq and hitting Enter
Restart your terminal
Reissue ng version and you should see it in your zsh shell:
If all the above methods doesn't work, then install angular-cli with Homebrew.
Run this in your Terminal (ZSH):
brew install angular-cli
Have a coffee, comeback and run this to test.
ng --version
Bingo.
The best solution is
alias ng="/Users/YourName/.npm-global/bin/ng"
Environment variable for "ng" may not be created. We can create it manually using the following steps:
Check if "ng" alias is present by opening your bash profile
touch ~/.bash_profile; open ~/.bash_profile
If there is no alias for "ng" found, Add the following alias in the bash file and save it
alias ng=/usr/local/Cellar/node/13.5.0/lib/node_modules/#angular/cli/bin/ng
Note: #angular/cli was installed under the following path for me
/usr/local/Cellar/node/13.5.0/lib/node_modules/#angular/cli. So I have added ng which is present under angular cli to the alias.
Now, check the ng version using
ng --version
This worked for me.
This is what worked for me, to fix this error
~ ng --version
zsh: command not found: ng
fix:
export PATH="$HOME/.npm-global/bin:$PATH"
I had the same problem, but the solution was to just add to my $PATH.
On MacOS Mojave with zsh, #Angular/CLI was not getting added to $PATH. You can add it to your path just by appending to /private/etc/paths:
sudo vim /private/etc/paths
append /Users/my_user_name/node_modules/#angular/cli/bin or wherever you installed #Angular/CLI.
save (:wq) and restart shell.
ng version then works.
My terminal display zsh: command not found: ng ,in visconde terminal not found command ng and not Mac terminal, I saw that in bashrc there was a line with the export of the ng command, so I copied the export that was inside bash and pasted it into ˜/.zshrc and now it works!

Uninstalling Maven from Mac OSX and windows

I have already installed Maven 3.3.9 on both Mac OSX and Windows 10.
However I face some issues relating to the local repository.
So, I think that it would be a good idea to uninstall are re install maven.
I am looking for a guide on how to completely remove maven, but I cannot find any.
Can you please help me with that??
Thanks in advance!!! :)
do "which mvn"
it will give you the path of mvn like this:
/usr/local/bin/mvn
do cd /usr/local/bin/
do ls -lrt | grep -i mvn
It will give you location from where mvn binary is picked up, sth like this:
lrwxr-xr-x 1 syaduvanshi admin 29B Sep 5 16:49 mvn -> ../Cellar/maven/3.6.2/bin/mvn
lrwxr-xr-x 1 syaduvanshi admin 34B Sep 5 16:49 mvnDebug -> ../Cellar/maven/3.6.2/bin/mvnDebug
lrwxr-xr-x 1 syaduvanshi admin 32B Sep 5 16:49 mvnyjp -> ../Cellar/maven/3.6.2/bin/mvnyjp
Now just go to that location and remove the maven folder
cd ../Cellar/
rm -rf maven
On a Mac, try doing
brew list mvn
If it's listed, it means it was installed using brew, and then you can uninstall it running:
brew uninstall mvn
on mac os you can remove the symbolic link and then delete directory
which mvn
/Users/Viraj/.sdkman/candidates/maven/current/bin/mvn
unlink ~/.sdkman/candidates/maven/current/bin/mvn
feel free to delete the unlinked directory
rm -r ~/.sdkman/candidates/maven

Using brew to Install GNU flex on OS X but got an error "/usr/local/lib/pkgconfig is not writable."

I need compile some LEX/YACC files(*.l) under OS X. And GNU flex is needed as a scanner.
However, I was stuck while installing GNU flex.
Run brew install flex, but got an error:
Error: You must `brew link xz' before flex can be installed
Then I run brew link xz, still got an error:
Error: Could not symlink lib/pkgconfig/liblzma.pc
/usr/local/lib/pkgconfig is not writable.
How to install flex on OS X 10.10 correctly? Is this problem caused by my home brew?
Some details about my 'brew':
Run brew doctor
Warning: /usr/local/lib/pkgconfig isn't writable.
This can happen if you "sudo make install" software that isn't managed by
by Homebrew. If a formula tries to write a file to this directory, the
install will fail during the link step.
You should probably `chown` /usr/local/lib/pkgconfig
Run ls command
yeze#yezedeMacBook-Pro:~$ ls -la /usr/local/lib/pkgconfig
total 16
drwxr-xr-x 4 root wheel 136 Mar 31 2013 .
drwxr-xr-x 30 yeze admin 1020 Oct 1 21:05 ..
-rw-r--r-- 1 root wheel 405 Mar 30 2013 tcl.pc
-rw-r--r-- 1 root wheel 404 Mar 30 2013 tk.pc
This question is caused by brew.
When you got /usr/local/lib/pkgconfig is not writable., you should run:
chown [YourAccountName] /usr/local/lib/pkgconfig
Then follow the instruction, run brew link xz. You may get a response like that :Linking /usr/local/Cellar/xz/5.2.1... 53 symlinks created
Finally, try brew install flex again, it will work.
Best thanks #IKavanagh.

How to do alternative install of Homebrew

Ok, well it's just been one of those nights where you spend hours and hours trying to get something to work, and you just keep getting weird errors, so if someone could help me I would greatly appreciate. After hours of trying to update Maven from 3.0.4 to 3.1.1 or 3.2.2 I've decided it's just not going to happen (I've tried almost everything I can find online, but I'm afraid to try to do to much in terminal) and I'm trying to install homebrew to make it easier. When I try to do the normal homebrew install I get an error that says:
dyld: lazy symbol binding failed: Symbol not found: ___strlcpy_chk
Referenced from: /usr/local/git/bin/git
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: ___strlcpy_chk
Referenced from: /usr/local/git/bin/git
Expected in: /usr/lib/libSystem.B.dylib
Failed during: git init -q
So then, I tried to do the alternative install method, but at this point I'm just so annoyed, and I don't get what it wants me to do. If anyone could give me some at least kind of detailed explanation for what to do I would be extremely grateful.
Here's where I'm looking at alternative installs: https://github.com/Homebrew/homebrew/wiki/Installation
The problem is I don't even really know what they mean by "untar" and "extract."
Thanks so much to anyone who can help
When I enter
ls -l /usr/local | pbcopy
I get:
total 0
drwxr-xr-x 2 root wheel 68 Aug 11 03:34 apache-maven
drwxrwxr-x 81 root admin 2754 Jan 17 2014 bin
drwxrwxr-x 3 root admin 102 Feb 21 2013 etc
drwxr-xr-x 9 root wheel 306 Jul 25 14:54 git
drwxrwxr-x 3 root admin 102 Feb 21 2013 lib
drwxrwxr-x 4 root admin 136 Feb 20 2013 share
drwxr-xr-x 4 root wheel 136 Dec 14 2013 texlive
Edited
Ok, so let's do an alternative install of homebrew:
cd /usr/local
mkdir homebrew
curl -L https://github.com/Homebrew/homebrew/tarball/master | tar xz --strip 1 -C homebrew
If that works, you just need to find the directory where the file brew is located and then add that to your PATH
So
find /usr/local -name brew
Let's suppose the previous command results in
/usr/local/homebrew/bin/brew
we take brew off the end (because we want to know its directory only) and we add that to the start of our PATH
export PATH=/usr/local/homebrew/bin:$PATH
Now we should be able to run
brew doctor
Also, we need to add that export PATH=.... command to our login sequence so our shell knows how to find brew every time we login. So add that line to the end of your ~/.profile
Original Answer
Ok, take a deep breath, and relax :-)
homebrew is a great choice on the Mac, so the pain should be worth it. I suspect you have a customised PATH and customised environment variables which are stopping the homebrew installation. You can either set your PATH and environment variables back to their default settings, or, if that is simpler, just add a new user to your Mac and log in as the new user with a standard environment and then install homebrew using the standard method.
To look at your PATH and environment variables, use these commands:
echo $PATH
set
or
set | grep -i LIB
to look for any customised DYLD_LIBRARY_PATH
Once you have it installed, try running
brew doctor
to check your setup before adding maven and other packages.

Resources