sudo: ports: command not found

Joined
Jan 12, 2005
Messages
1,278
Reaction score
13
Points
38
Location
/home/sheffield/UK
Your Mac's Specs
12" 1Ghz PB 768Mb 10.4.5 30Gb Video iPod 40Gb 3G iPod 1Gb iPod Shuffle
right im starting to play now :p

installed XCode and then installed darwinports

follwed the instructions here and then did a

sudo ports install gaim

and it gave me that the command wasnt found!? Any ideas as to why anyone
 
Joined
Mar 9, 2004
Messages
2,860
Reaction score
21
Points
38
Location
Miami FL
Your Mac's Specs
G4 1Ghz OS X 10.4.7
The SUDO command:
sudo - execute a command as another user

SYNOPSIS
sudo -V | -h | -l | -L | -v | -k | -K | -s | [ -H ] [-P ] [-S ] [ -b ]
| [ -p prompt ] [ -c class|- ] [ -a auth_type ] [ -u username|#uid ]
command

DESCRIPTION
sudo allows a permitted user to execute a command as the superuser or
another user, as specified in the sudoers file. The real and effective
uid and gid are set to match those of the target user as specified in
the passwd file (the group vector is also initialized when the target
user is not root). By default, sudo requires that users authenticate
themselves with a password (NOTE: by default this is the user's pass-
word, not the root password). Once a user has been authenticated, a
timestamp is updated and the user may then use sudo without a password
for a short period of time (5 minutes unless overridden in sudoers).

sudo determines who is an authorized user by consulting the file
/etc/sudoers. By giving sudo the -v flag a user can update the time
 
Joined
Dec 30, 2002
Messages
2,118
Reaction score
23
Points
38
Location
Sunny So Cal
Your Mac's Specs
G5•2x1.8•1.5•320•8x+/-
yes. always consult man page before copy/pasting something in the terminal you found online.
 
OP
inflexion
Joined
Jan 12, 2005
Messages
1,278
Reaction score
13
Points
38
Location
/home/sheffield/UK
Your Mac's Specs
12" 1Ghz PB 768Mb 10.4.5 30Gb Video iPod 40Gb 3G iPod 1Gb iPod Shuffle
thanks for that but even using port dont work still get command not found
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
My guess the port command is not in your path.

Try the folllowing: sudo ./port install gaim

That is asuming you are sitting where you installed the software.

THe next question is did you have a problem with the xcode install or the darwinports install?
 
OP
inflexion
Joined
Jan 12, 2005
Messages
1,278
Reaction score
13
Points
38
Location
/home/sheffield/UK
Your Mac's Specs
12" 1Ghz PB 768Mb 10.4.5 30Gb Video iPod 40Gb 3G iPod 1Gb iPod Shuffle
/darwinports is the directory that im in and i tried the sudo ./port install gaim
tried the same in the /darwinports/dports folder but i then get
./port command not found

only problem i say when installing was X11 not found as it was running the make part of the install
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
I am assuming the you are trying to run a command called port and the system does not know where the command is located.

Try the following to see if you can locate the command.

sudo find / -name port -exec ls -l {} \;

Enter the above line jet as it is. Hopefully, it will locate the command. If it does not, then it is not on your system.
 
OP
inflexion
Joined
Jan 12, 2005
Messages
1,278
Reaction score
13
Points
38
Location
/home/sheffield/UK
Your Mac's Specs
12" 1Ghz PB 768Mb 10.4.5 30Gb Video iPod 40Gb 3G iPod 1Gb iPod Shuffle
-r-xr-xr-x 1 root admin 23191 27 Apr 23:43 /opt/local/bin/port
total 168
drwxr-xr-x 6 matthewa matthewa 204 27 Apr 23:37 CVS
-rw-r--r-- 1 matthewa matthewa 926 17 Dec 02:07 Makefile
-rw-r--r-- 1 matthewa matthewa 23191 27 Apr 23:43 port
-rw-r--r-- 1 matthewa matthewa 7175 21 Mar 19:38 port.1
-rwxr-xr-x 1 matthewa matthewa 23189 20 Apr 04:53 port.tcl
-rw-r--r-- 1 matthewa matthewa 2661 27 Apr 23:43 portall
-rwxr-xr-x 1 matthewa matthewa 2659 29 Mar 10:00 portall.tcl
-rw-r--r-- 1 matthewa matthewa 4893 27 Apr 23:43 portindex
-rwxr-xr-x 1 matthewa matthewa 4891 29 Mar 10:00 portindex.tcl
-rw-r--r-- 1 matthewa matthewa 23191 27 Apr 23:43 /Users/matthewayres/darwinports/base/src/port/port


is what it gives so that means that its installed yes?
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
Now that you know it is installed, do the following:

sudo /opt/local/bin/port install gaim
 
OP
inflexion
Joined
Jan 12, 2005
Messages
1,278
Reaction score
13
Points
38
Location
/home/sheffield/UK
Your Mac's Specs
12" 1Ghz PB 768Mb 10.4.5 30Gb Video iPod 40Gb 3G iPod 1Gb iPod Shuffle
Thanks rman that worked a treat :)

can i set that path as an alias now like i can in linux?
If so is it the same and where is the location of the file to do it?
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
I don't know about the tcsh (trusted shell), but I know you can in csh (c shell) and ksh (kron shell). I believe the file that you want to create is the .tcshrc

Below is an example, I found my googling .tcshrc.

Modifying your .tcshrc file
The following is an example .tcshrc file. The most up-to-date version is located in /usr/local/tcsh as tcsh.cshrc.

set prompt="%S %m %/ %s%% "
set path = ( . /usr/local/bin /usr/local/lang /usr/local/X11/bin /usr/ucb /usr/bin /usr/etc /usr/openwin/bin /usr/local/wp/wpbin $path)
set history=50
set savehist
setenv MANPATH /usr/local/man:/usr/man:/usr/local/X11/man:/usr/local/pbmplus/man:/usr/local/lang/man:/usr/local/tex/man:/usr/local/gmt/man:/usr/local/hdf/man:/usr/local/mathematica/Documents/man:/usr/local/netcdf/man:/usr/local/ncar/man:/usr/local/splus/man:/usr/local/mathematica/man:/usr/local/lotus/man
setenv TEXINPUTS .:/usr/local/tex/inputs
setenv LD_LIBRARY_PATH /usr/lib:/usr/local/X11/lib:/usr/local/lang/SC1.0
umask 022
limit coredumpsize 0
#
#
# setting your editor, uncomment one of these pairs
#
#setenv EDITOR emacs
#setenv VISUAL emacs
#setenv EDITOR vi
#setenv VISUAL vi
#
# setting your pager, uncomment one of these
#
#setenv PAGER less
#setenv PAGER more
#
# setting your printer, use the PRINTER and LASER environment variables
# in the following you will need to add the printer name
#
# current printers are: nautilus, discovery, garth, wayne (letterhead), and
# aurora (not postscript)
#
#setenv PRINTER
#setenv LASER

# if you use any of the following uncomment
#source /usr/local/Standards/gmt
#source /usr/local/Standards/hdf
#source /usr/local/Standards/idl
#source /usr/local/Standards/imsl
#source /usr/local/Standards/ncar
#source /usr/local/Standards/pbmplus
#source /usr/local/Standards/nodctools
#source /usr/local/Standards/netcdf
#source /usr/local/Standards/lterSetUp
#source /usr/local/Standards/mathematica

# if you want to put customizations put them in a separate file and source
# it here.
 
OP
inflexion
Joined
Jan 12, 2005
Messages
1,278
Reaction score
13
Points
38
Location
/home/sheffield/UK
Your Mac's Specs
12" 1Ghz PB 768Mb 10.4.5 30Gb Video iPod 40Gb 3G iPod 1Gb iPod Shuffle
hmm you know what i dont play with shells so i think ill leave it untill i get Tiger and hope that it behaves :p
 
Joined
Jun 2, 2012
Messages
8
Reaction score
0
Points
1
Your Mac's Specs
Macbook mid 2007 10.6.3
what does this mean?

/etc/sudoers ls mode 0664 should be 0440
Segmentation fault
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
It means that the permissions are wrong on the sudoers file (which outlines who has access to what through sudo). Change the permissions to 440:
Code:
sudo chmod 440 /etc/sudoers
 
Joined
Jun 2, 2012
Messages
8
Reaction score
0
Points
1
Your Mac's Specs
Macbook mid 2007 10.6.3
How can you do that without permissions? I keep getting Segmentation Fault
But thank you for suggestion however ;)
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top