What directory to install MacPorts in?

Joined
Apr 16, 2012
Messages
14
Reaction score
0
Points
1
My finder is broken, and I'm trying to recover it (I deleted an essential Frameworks file). To do that, I need to install MacPorts from the command line (I've got it mounted and am ready to set a target).

The FAQ at MacPorts Guide says to install it in /opt/local, but I can't find an /opt directory (I'm on a PPC with OS 10.5).

Is there an optional location (one that would be found in PATH) where I can install it (and not have to change the PATH variables in "~/.bash_profile"?

Many thanks.
 
Joined
Aug 14, 2007
Messages
63
Reaction score
0
Points
6
You can make the directory /opt/local. It's not a standard directory, but seems that MacPorts will install there as default. Further than that I can't really help you, but save all the messing around, perhaps just restore 10.5?...
 
Joined
Jul 2, 2007
Messages
3,494
Reaction score
204
Points
63
Location
Going Galt...
Your Mac's Specs
MacBookAir5,2:10.13.6-iMac18,3:10.13.6-iPhone9,3:11.4.1
FWIW...

# MacPorts Installer addition on 2011-07-28_at_22:18:31: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.

Note: that smilie is suppose to be : $PATH with no space between the : and $PATH.
 
OP
J
Joined
Apr 16, 2012
Messages
14
Reaction score
0
Points
1
Installing MacPorts

Thanks, Hutchism. I'll create the directory. I thought that MAYBE it was already supposed to be there.

XJ: I'm fairly new to Linux, and I'm not sure what your comment means. I THINK you're saying that I should use the text you sent as a script, or edit an existing script by placing it in there. If that's the case, please let me know.

I don't believe you're saying I should execute "export PATH=/opt/local/bin:/opt/local/sbin (SMILEY FACE GOES HERE) PATH" at the command line. God, I've been searching the man pages for "smiley face" for hours and ...

Seriously. I'm that new. Unfortunately, you'd need to spell it out in a little more detail (and for which I apologize, and for which--if you're willing to take the time--I'd be grateful). If there's a FAQ that explains it, I'm happy (very happy) to pull it out of there.
 
Joined
Jul 2, 2007
Messages
3,494
Reaction score
204
Points
63
Location
Going Galt...
Your Mac's Specs
MacBookAir5,2:10.13.6-iMac18,3:10.13.6-iPhone9,3:11.4.1
My post is not a script, so please don't run it. I was just confirming that the directory structure (/opt/local) is valid by showing you the entry in my .profile listing for MacPorts. You can create it, though if I recall correctly the installer defaulted to it and created it during the installation. It's been awhile since I installed it. Once you run the installer, you should have a similar line in your .profile file.

The ownerships on my directories in the /opt/local path are:

drwxr-xr-x 3 root admin 102 Jun 17 2010 opt

drwxr-xr-x 13 root admin 442 May 2 21:26 local

drwxr-xr-x 7 root admin 238 May 2 21:26 bin
 
OP
J
Joined
Apr 16, 2012
Messages
14
Reaction score
0
Points
1
XJ: Whew! Thank you. I was worried I was going to have to start editing scripts (I'm working up to that, but I'm not ready yet).

But here's a new problem: I downloaded the wrong version of MacPorts, and can't find the proper one for OS 10.5. I tried to install the 10.7 version and (of course) got an error message.

Do you (XJ, or anyone) know what the correct version for 10.5 is, and where to get it? I've been reading the MacPorts guide and other FAQs for two hours and can't even find a listing for what the RIGHT version is supposed to be. When there's any reference to 10.5, it's for XCode, not MacPorts.

Many thanks,
JPS

PS: XJ, that is one awesome Starbucks spoof.
 
Joined
Jul 2, 2007
Messages
3,494
Reaction score
204
Points
63
Location
Going Galt...
Your Mac's Specs
MacBookAir5,2:10.13.6-iMac18,3:10.13.6-iPhone9,3:11.4.1
XJ: Whew! Thank you. I was worried I was going to have to start editing scripts (I'm working up to that, but I'm not ready yet).

But here's a new problem: I downloaded the wrong version of MacPorts, and can't find the proper one for OS 10.5. I tried to install the 10.7 version and (of course) got an error message.

Do you (XJ, or anyone) know what the correct version for 10.5 is, and where to get it? I've been reading the MacPorts guide and other FAQs for two hours and can't even find a listing for what the RIGHT version is supposed to be. When there's any reference to 10.5, it's for XCode, not MacPorts.

Many thanks,
JPS

PS: XJ, that is one awesome Starbucks spoof.

Download directory...

https://distfiles.macports.org/MacPorts/

I believe you want this one...

https://distfiles.macports.org/MacPorts/MacPorts-2.0.4-10.5-Leopard.dmg

MacPorts-2.0.4-10.5-Leopard.dmg
 

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)
My finder is broken, and I'm trying to recover it (I deleted an essential Frameworks file). To do that, I need to install MacPorts from the command line (I've got it mounted and am ready to set a target).
I'm curious to know how MacPorts is going to help fix this. MacPorts installs everything in /opt/local and keeps it self sperate from the rest of the system on purpose. What framework did you delete?
 
OP
J
Joined
Apr 16, 2012
Messages
14
Reaction score
0
Points
1
XJ: You are sooooooo right. And sooo helpful. Thank you. I just finished installing MacPorts.

Vansmith: I'm curious, too. I'd read in a forum that I might be able to resolve the problem by using (I believe--lord, it's been so long now) "apt-get update". My old bash didn't have "apt-get" and I didn't have any compilers. Upgrading bash and installing MacPorts were ways of getting around those problems. It's been three weeks since I fubar'd the Frameworks directory; I believe I murdered the "V" subdirectory. Before anyone asks why I would do such a thing, let me save you some time:

1: I don't know what I'm doing (but am trying to learn);

2: I was trying to kill the script that was launching the iCal notification process, which was opening EVERY iCal appointment I had EVER made, locking down my system. The script was (to my surprise) also responsible (in some way) for completing the Finder launch. (There are a digital ton of complaints about the iCal implosion-issue online; but no response I've seen from Apple; the silence from Apple is one of the reasons I started learning Linux; I'm filing for divorce from Macintosh.)
 

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)
If the guide said to use "apt-get," you're reading a guide for the wrong operating system (apt is a tool for Debian based operating systems). The tool you need with MacPorts is called "port."

The "V" subdirectory doesn't tell us much. Can you be a little more specific about which folder you deleted? Regardless, if it's an integral component of an important framework, the only foolproof solution is to re-install OS X.

I have a hard time believing that iCal notifications are handled by the same process that manages Finder. What was the name of this script? Better yet, what instructions are you reading?
 
Joined
Aug 14, 2007
Messages
63
Reaction score
0
Points
6
Which folder do you need from 10.5? I'll send it to you!
(I'm running 10.5.8 on a 12" G4 PowerBook)
 
OP
J
Joined
Apr 16, 2012
Messages
14
Reaction score
0
Points
1
Installing MacPorts

van: It's been so long now--about three weeks--I've forgotten it. I tried to pull it out of .bash_history, but I don't see the history going back that far. (Thanks for pointing out the issue with not being able to invoke "apt-get." I surely must have been reading a FAQ for the wrong operating system.)

I have a hard time believing the deletion would affect Finder, too--which is why I foolishly deleted the script.

But I need to focus more on at least completing the processes I've started, even if they turn out to be dead ends (and I want to do this so I can at least improve the functionality of my Mac, even if those functions don't include the initial objective--updating the Frameworks directory; you're right--a reinstall of OS X would be easier, but I got the Mac used, without an install disk; another foolish thing to do).

So, here's where I am: I installed Xcode Tools and MacPorts. I tried to use "selfupdate" but Terminal replied "command not found." That means something is amiss with the install, right? Maybe a PATH variable that's missing?

"Port" yields the same message.
 
OP
J
Joined
Apr 16, 2012
Messages
14
Reaction score
0
Points
1
Hutchism: That is a very kind offer. I wish I knew which one; I'm using "locate" to get a listing of the directories that reside under /Frameworks. Do you know how to use bash history to go back a few weeks? I was just using "less" to look at a bash history file, but it looks like that list of items is session based--like it doesn't reference earlier sessions.

I'm sure the Frameworks directory wasn't one that resided under one of the app directories (and there's where my problem was--I didn't kill an iCal Frameworks folder; I killed one associated with startup scripts, so it appears).

Sorry to drag this out, but there are HUNDREDS of Frameworks folders!
 
OP
J
Joined
Apr 16, 2012
Messages
14
Reaction score
0
Points
1
Maybe some progress: I used "ps x" to get a list of processes, because that's how I got the name of the directory I deleted in my fubar thinking three weeks ago.

After looking at that list, I believe the Frameworks directory would be one that either sat under "/System/Library/Frameworks/CoreServices.framework"

or under "/System/Library/Frameworks/"

The former would involve far less folders to copy (and send). Just in case we get to that point, my email is [email protected]
 

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)
So, here's where I am: I installed Xcode Tools and MacPorts. I tried to use "selfupdate" but Terminal replied "command not found." That means something is amiss with the install, right? Maybe a PATH variable that's missing?
I'm not sure where you're getting selfupdate from. To sync the MacPorts database, you need to execute the following:
Code:
port sync
Is that what you're trying to do?

"Port" yields the same message.
Commands are case-sensitive. ;)

Truly though, you're probably wasting your time. Like I mentioned, MacPorts keeps everything contained in /opt and won't touch any system frameworks. Again, what did you delete?
 

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)
"/System/Library/Frameworks/CoreServices.framework" - You've got mail!
I believe I murdered the "V" subdirectory.
The folder might have very well been in the CoreServices folder but what "V" folder? This is what I'm looking for.

If it truly was something in CoreServices, you're pretty much out of luck given that the content in there is akin to the heart. It couldn't have been the whole folder though because otherwise, the machine would be all but useless.
 
Joined
Aug 14, 2007
Messages
63
Reaction score
0
Points
6
Know idea on this 'V' directory either, but good luck to him. Certainly has more patience than me. I do what I need to do on my machine these days and only occasionally need to do anything in Terminal. Glad to have a solid system which doesn't need constant fettling ;)

Bit of a gamble, but if he backs his 'CoreServices' folder up and copies mine on the top it might do the job. Assuming that it is this folder which is fragged. :s
 
OP
J
Joined
Apr 16, 2012
Messages
14
Reaction score
0
Points
1
What directory to install MacPorts in/changing PATH variables?

You're absolutely right. Commands are case sensitive. I uppercased the command because I was starting a sentence (and forgot that I need to keep the command listed EXACTLY as it should appear in the shell).

I've got MacPorts and XCode Tools installed, but when I try to issue commands such as "port" I get an error message. I think this means I need to reset my PATH variables. I found the following guidance online, but there's a sentence in it that worries me. The text says to reset a PATH variable,

"Just open up Terminal and enter the following (changing the path ‘/opt/subversion/bin’, naturally):

echo 'export PATH=/opt/subversion/bin:$PATH' >> ~/.bash_profile

If .bash_profile doesn’t exist yet (and it doesn’t by default), it’ll be created. Otherwise, the environment variable will be added to that file."


.bash_profile doesn't exist until someone sets it? That's not right, is it? I thought that file was part of the OS.

I just want to make sure I'm not going to overwrite a file that I shouldn't overwrite. The quoted text was copied from this site: http://peterheide.com/2008/10/04/adding-an-environment-variable-to-bash-path-in-os-x/
 
OP
J
Joined
Apr 16, 2012
Messages
14
Reaction score
0
Points
1
The deleted folder is ...

The folder might have very well been in the CoreServices folder but what "V" folder? This is what I'm looking for.

Vansmith: I wish I knew. I'd hoped to be able to get it from .bash_history, but no luck there. If you know how to get history from WEEKS ago, please let me know and I'll research my commands. You're obviously right about the CoreServices folder. I must have deleted pretty deep into it, otherwise I'd be completely dead, instead of just partly dead.
 

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