.profile file possible corrupted?
ryandesign at macports.org
Mon Aug 1 18:39:00 PDT 2011
On Aug 1, 2011, at 11:27, james collins wrote:
> I have been trying to install macports for awhile now. I originally installed it to use recoll, which is a search utility I believe. Maybe I could ask some general questions about macports.
> I originally downloaded the macports dmg file and used the installer to install it on my hard drive. So one question I have is, does macports come with snow leopard? Which is probably
No, MacPorts doesn't come with any version of Mac OS X. It is a separate piece of software, just like Recoll is.
> A stupid question. But before I started trying to install macports, there was nothing on my computer about macports? I have seen the term MacPorts used aswell, but there was nothing on my computer, even in the applications folder related to macports?
MacPorts is not a program that would appear in the Applications folder. It is a command ("port") that you run on the command line in the Terminal.
Separately, there are GUI MacPorts interfaces that could appear in the Applications folder, if you would prefer to install ports using a graphical interface rather than the command line. One of these is Pallet, developed by the MacPorts project:
Others are Port Authority (costs money):
Porticus says it is not compatible with Lion or MacPorts 2.0.0 yet. I don't know about Port Authority.
Separately, some of the ports you can install using MacPorts (such as Recoll) are graphical programs that could appear in the Applications folder.
> One reason I ask is I have installed and reinstalled macports about five times or so. And I have thrown out folders called macports, and I just wondered if I did something wrong?
> I have uninstalled also using directions from the macports site, I think. Where I use port -f uninstall installed. But I have also just thrown out folders called macports? I have also noticed when I uninstalled folders in my directory structure called macports, so I don't know if I uninstalled correctly?
Don't "throw out folders called macports"; if you want to uninstall MacPorts, follow the uninstallation instructions in the Guide:
> I remember my first attempt, I was reading a tutorial on recoll. And I downloaded macports, used the dmg file to install it then I edited sources.conf by putting a local repository pointing to my home directory, and then added the following line:
> rsync://rsync.macports.org/release/ports [default]
That line should have been in your sources.conf to begin with so you should not have needed to add it...
> I later found out that these instructions were old, that recoll is now a part of macports. But I am saying this because when I went into terminal some how my computer started downloading all this software. Which surprised me because originally I just wanted recoll. Like one of the things my computer downloaded was python.
> And I think my computer was configuring and installing this software. So I wondered is this the basic idea behind macports, like I haven't been able to get back to that point?
Don't be surprised by that. Recoll does not exist in a vacuum. It requires a number of other libraries in order to function. And those other libraries require other libraries, and so on. If your port command is working, you can use the command "port rdeps recoll" to see the recursive list of dependencies that will be installed. Or here it is in graph form, generated by the port-depgraph script:
As you can see, in all, 118 ports will be installed in order to give you recoll. This will probably take a couple hours for your computer to do so don't be surprised if things seem to be taking awhile.
> My computer get stuck during my initial try and I had to close down the terminal window. Days later I tried to repeat what I did but ran into problems.
"Stuck" isn't a very specific description so I'm not sure what happened there.
> My latest attempt I used svn, because rsync and http weren't working. I used svn following a tutorial and my terminal window downloaded a lot of stuff i.e. There was an uppercase A on the left of my terminal window and stuff would scroll by.
Yes, that's Subversion downloading all the portfile definitions. Good. So you're able to sync now.
> I then edited sources.conf by adding the following line:
> file:///opt/local/var/macports/sources/svn.macports.org/trunk/dports [default]
> And commented out the rsync line. Does this tell macports to look for this on my computer. Like when I run selfupdate? Rather than going to the web?
First of all, I should have explained earlier, there are two commands to update MacPorts. One of them is "sudo port sync". This updates only your portfile definitions. The second command is "sudo port selfupdate". This updates the MacPorts program itself to the latest version (if there is an update), and then runs a sync for you. So generally we just tell people to run selfupdate since there's usually no reason for a user not to do both steps at once.
By default, both syncing the port definitions and downloading the MacPorts base code happens over rsync. Based on the errors you're seeing, it still seems to me that on your network, rsync cannot be used. Usually this happens in corporate environments where IT has decided to block certain services they perceive as nonessential. The above changes you've made have told MacPorts to fetch port definitions from our Subversion server instead of from our rsync server. This should solve the problem for running "sudo port sync" because Subversion talks over the same http protocol used by web sites, so unless your network is so restricted that you can't even browse web sites, this should work.
However, selfupdate is still trying to download MacPorts base updates using rsync. And there is no way to tell MacPorts to use a different method for that. So unless you can get rsync working on your network, you can't run selfupdate. You'll have to manually keep an eye on our announcements (subscribe to the macports-announce mailing list perhaps) and when a new version of MacPorts is released, update to it manually (for example by downloading the new disk image from our web site and running the installer). This will not affect any ports you may already have installed.
> Is the software I downloaded configured and installed? I don't think it is because I tried running recoll but can't find the executable? I think I could manually install recoll, but is there a way to install all the ports I downloaded?
All you've downloaded using the above steps is the portfile definitions -- the instructions that tell MacPorts how to build and install any of our ports. Now you need to tell MacPorts to actually install the port(s) you want -- for example:
sudo port install recoll
> I have been getting an error when trying to run selfupdate, it says:
> Error: /opt/local/bin/port: port selfupdate failed: Error synchronizing MacPorts sources: shell command failed (see log)
Right, that's the rsync fetch of MacPorts base failing.
> I the my .profile file is corrupted but not sure, I have a .profile file in my home directory and then I have 5 .profile.macports-saved_ files with different dates on them.
What makes you think there's anything wrong with your .profile? I see no evidence of that yet.
> I am wondering if the error I am getting, and the fact that rsync and http aren't working, and the fact that I can't selfupdate are related?
Actually I'm sure downloading the ports tarball via http would work fine, if you wanted to go back to using that instead of Subversion. Though using Subversion will work fine too, and it's what most of the developers of MacPorts use. Using Subversion will be more bandwidth-efficient but will cause more disk activity. If your disk is slow (e.g. a hard drive, not an SSD) but if your Internet connection is fast and unlimited, downloading the ports tarball via http could be quicker.
> Sent from my iPhone
You typed all that on your iPhone? :)
More information about the macports-users