I'm kind of rusty at building software from the command line. whenever i've had to do it I just follow directions..so i don't have to tools to troubleshoot when something goes wrong...as it has today. I've run into a problem trying to build SQLite3 on a PowerPC Mac running OS X 10.5.8 (Leopard).
here are the "instructions" i'm following:
$ curl -O http://sqlite.org/sqlite-amalgamation-3.6.21.tar.gz
$ tar xzf sqlite-amalgamation-3.6.21.tar.gz
$ cd sqlite-3.6.421
$ ./configure –prefix=/usr/local
$ make
$ sudo make install
And here's what I'm doing...
$ pwd
/usr/local/src
$ curl -O http://sqlite.org/sqlite-amalgamation-3.7.3.zip
$ unzip sqlite-amalgamation-3.7.3.zip
$ ls -l
total 9096
-rw-r--r--# 1 elvis admin 82346 Oct 7 19:37 shell.c
-rw-r--r-- 1 elvis admin 1217170 Nov 20 11:47 sqlite-amalgamation-3_7_3.zip
-rw-r--r--# 1 elvis admin 4245940 Oct 7 19:36 sqlite3.c
-rw-r--r--# 1 elvis admin 3961 Oct 7 19:37 sqlite3.def
-rw-r--r--# 1 elvis admin 291339 Oct 7 19:37 sqlite3.h
-rw-r--r--# 1 elvis admin 20686 Oct 7 19:37 sqlite3ext.h
$ ./configure –prefix=/usr/local
-bash: ./configure: No such file or directory
Am I missing a configure file? Do I have the wrong source? I grabbed the zip version because I couldn't find the tarball (though admittedly didn't look too hard).
How do I build sqlite3 so it installs in /usr/local?
You must cd into the new in-tarred folder, then run ./configure. Also, use tar. It's better.
So: cd sqlit (hit tab)
./config...
Related
There's an odd behaviour when using relative paths. For example:
$ cd /Users
$ ls -l ../bin
ls: ../bin: No such file or directory
$ ls -l /bin
-r-xr-xr-x 1 root wheel 623344 31 May 08:33 bash
-rwxr-xr-x 1 root wheel 36768 31 May 08:33 cat
...
But the following works fine:
$ cd /dev
$ ls -l ../bin
-r-xr-xr-x 1 root wheel 623344 31 May 08:33 bash
-rwxr-xr-x 1 root wheel 36768 31 May 08:33 cat
...
Some other directories do not return the No such file or directory message, but they act as if there was nothing there. For example:
$ cd /Users
$ ls -l ../dev
$
returns nothing, and back to the prompt. The following, however, works fine:
$ cd /bin
$ ls -l ../dev
crw------- 1 root wheel 19, 1 11 Jun 16:54 afsc_type5
crw------- 1 root wheel 10, 0 11 Jun 16:54 auditpipe
crw-r--r-- 1 root wheel 9, 3 11 Jun 16:54 auditsessions
...
I could not find anything on the release notes. The WWDC2019 session 710 (What's New in Apple File Systems) also does not mention anything.
I think it might be related to the new separation of directories into a read-only and a read-write volumes. But still, it should work.
I found this to be specially problematic when using npm link, which links to /usr/local/lib/node_modules/... but expressed as a relative path from the destination package. After linking I have to manually change the link from relative to absolute. An ugly hack that may have some unforeseen consequences.
Anybody any clues?
The issue has been resolved with in Catalina beta 4.
david#raspberrypi:~ $ go env
-bash: /usr/bin/go: Permission denied
this is my bash.rc
export GOPATH=$HOME/go
$HOME/.bashrc
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
if i run ls-lah in my david#raspberry pi, i get the following:
david#raspberrypi:~ $ ls -lah
total 28K
drwxr-xr-x 3 david david 4.0K Mar 2 22:20 .
drwxr-xr-x 4 root root 4.0K Mar 2 20:03 ..
-rw------- 1 david david 3.1K Mar 2 21:48 .bash_history
-rw-r--r-- 1 david david 220 Mar 2 20:03 .bash_logout
-rw-r--r-- 1 david david 3.6K Mar 2 22:15 .bashrc
lrwxrwxrwx 1 david root 11 Mar 2 21:31 go -> /usr/lib/go
drwxr-xr-x 2 david david 4.0K Mar 2 20:25 .nano
-rw-r--r-- 1 david david 675 Mar 2 20:03 .profile
I am assuming that the user you're logged in as doesn't have permissions to run go.
To find that out, run the following
$ which go
/usr/local/go/bin/go
$ ls -l $(which go)
-rwxr-xr-x 1 root wheel 12896684 Jan 24 01:28 /usr/local/go/bin/go
From the above we know that the owner is root and group owner is wheel.
Now run echo $USER to see if who is logged in user.
Since you're getting permission denied to run go as $USER, you may want to add the user into the group mentioned in ls -l. So, run the below.
$ usermod -aG $USER wheel
And reboot the system! Then try go env again to see if it works.
-a is for append
-G is for which groups to append
usermod docs
Remember wheel is the group owner that I got while running ls -l. Yours might be different.
This usermod command is for ubuntu. In your case, it is raspberry pi so raspbian OS. Find out the correct options as it changes from OS to OS.
I'm trying to compile the Ethereum Go client. Following the instructions I simply run make geth, but that fails:
$ make geth
build/env.sh go run build/ci.go install ./cmd/geth
make: build/env.sh: No such file or directory
make: *** [geth] Error 1
As far as I understand from this error it complaints that either build/env.sh or build/ci.go doesn't exist. So I checked out the build folder, but they both seem to be there:
$ ls -l build
total 648
drwxr-xr-x 3 kramer65 staff 102 Feb 13 13:45 _vendor
-rw-r--r-- 1 kramer65 staff 2892 Feb 13 13:45 ci-notes.md
-rw-r--r-- 1 kramer65 staff 30516 Feb 13 13:45 ci.go <===
-rw-r--r-- 1 kramer65 staff 123 Feb 13 13:45 deb.changelog
... some other files here
-rw-r--r-- 1 kramer65 staff 379 Feb 13 13:45 deb.rules
-rwxr-xr-x 1 kramer65 staff 721 Feb 13 13:45 env.sh <===
-rw-r--r-- 1 kramer65 staff 1722 Feb 13 13:45 mvn.pom
... and some more files here
I checked whether go is installed and which version it is:
$ which go
/usr/local/bin/go
$ go version
go version go1.7.5 darwin/amd64
So go seems to be fine.
Does anybody have any idea how I can debug/solve this? All tips are welcome!
Ok, nevermind. Found it. The problem was that line endings where in dos style.
So to recursively convert line endings to unix I ran:
find . -type f -print0 | xargs -0 -n 1 -P 4 dos2unix
and then tried building again. That fixed it.
I hope this helps someone else here. In any case I wish you all a beautiful day!
I solve the problem using by following instructions below. I don't know the reason, but I completely get rid of brew to make it run. (mac)
1 install go(I used package)
2 git clone https://github.com/ethereum/go-ethereum
3 cd go-ethereum && git checkout tags/v1.8.2
4 run `find . -type f -print0 | xargs -0 -n 1 -P 4 dos2unix`(if you don't have dos2unix, you could brew one, it does not break anything.)
5 make geth
6 ln -s /path/to/origin/geth /path/to/target/geth
Then run which geth you could find your geth. Run geth version you can see your version.
I don't remember how I installed saltstack on my mac, so I tried uninstalling it every way possible. I tried brew uninstall saltstack, pip uninstall salt. I attempted to see if salt -h had anything to say to uninstall it, but it didn't work.
Update some system outputs
➤ pip list | grep salt
➤ whereis salt-call
➤ which salt-call
/opt/salt/bin/salt-call
➤ ls -l /opt/salt
total 0
drwxr-xr-x 45 root wheel 1.5K 24 Aug 13:07 bin/
drwxr-xr-x 8 root wheel 272B 24 Aug 13:07 include/
drwxr-xr-x 14 root wheel 476B 24 Aug 13:07 lib/
drwxr-xr-x 8 root wheel 272B 24 Aug 13:07 openssl/
drwxr-xr-x 3 root wheel 102B 24 Aug 13:07 share/
I'm guessing I installed it from this link:
curl -L https://bootstrap.saltstack.com -o install_salt.sh
sudo sh install_salt.sh -P -M
but it doesn't say how to uninstall it based on this method. Anyone know?
/opt/salt/bin/salt-call
It looks like you installed it using .pkg file: https://repo.saltstack.com/osx/
You can verify by running some commands:
❯❯❯❯ pkgutil --pkgs | grep salt
com.saltstack.salt
❯❯❯❯ pkgutil --pkg-info com.saltstack.salt
package-id: com.saltstack.salt
version: 2016.11.3
volume: /
location: /
install-time: 1504874150
List installed files:
❯❯❯❯ pkgutil --files com.saltstack.salt
Library
Library/LaunchDaemons
Library/LaunchDaemons/com.saltstack.salt.api.plist
Library/LaunchDaemons/com.saltstack.salt.master.plist
Library/LaunchDaemons/com.saltstack.salt.minion.plist
Library/LaunchDaemons/com.saltstack.salt.syndic.plist
etc
etc/salt
etc/salt/master.dist
etc/salt/minion.dist
opt
opt/salt
opt/salt/bin
...
Stop services:
❯❯❯❯ sudo launchctl unload -w /Library/LaunchDaemons/com.saltstack.salt.minion.plist
Do the same for api, master, syndic if they are running.
Remove files first:
❯❯❯❯ cd /
❯❯❯❯ pkgutil --only-files --files com.saltstack.salt | grep -v opt
Library/LaunchDaemons/com.saltstack.salt.api.plist
Library/LaunchDaemons/com.saltstack.salt.master.plist
Library/LaunchDaemons/com.saltstack.salt.minion.plist
Library/LaunchDaemons/com.saltstack.salt.syndic.plist
etc/salt/master.dist
etc/salt/minion.dist
❯❯❯❯ pkgutil --only-files --files com.saltstack.salt | grep -v opt | tr '\n' '\0' | xargs -0 sudo rm -f
then directories:
❯❯❯❯ pkgutil --only-dirs --files com.saltstack.salt | grep -v opt
Library
Library/LaunchDaemons
etc
etc/salt
❯❯❯❯ sudo rm -fr etc/salt
❯❯❯❯ sudo rm -fr opt/salt
And finally, remove the receipt:
❯❯❯❯ sudo pkgutil --forget com.saltstack.salt
Forgot package 'com.saltstack.salt' on '/'.
As long as you don't know exactly how it was installed it is a little difficult to tell how to get rid of it.
The mentioned link points to a script that is salt-bootstrap behind the scene - OSX is not mentioned there as supported, but maybe it works the BSD-way for OSX in this case.
Did you stumbled upon this page - it actually shows multiple ways of installing saltstack on OS X. Maybe you recognize what you've done before.
However in the end salt is just a bunch of python files. What does pip list say? Or whereis salt-call? This should give you some hints where salt is located.
How do you uninstall xcode (7.4) ?
Most articles on the net mention a command
sudo /Developer/Library/uninstall-devtools --mode=all
but I dont have that program. Here's what I have
macimage:~ user1$ sudo ls -la /Library/Developer/
total 0
drwxr-xr-x 3 root admin 102 Aug 1 2014 .
drwxr-xr-x+ 67 root admin 2278 Sep 9 14:59 ..
drwxr-xr-x 4 root admin 136 Jul 24 2014 CommandLineTools
macimage:~ user1$
macimage:~ user1$ sudo ls -la /Developer/
ls: /Developer/: No such file or directory
macimage:~ user1$