I have just started using Macports and I wonder how to get round the following annoying problem. Each port that I download complains about a number of files (between 5 and 35) that are "unregistered". The install stops at every single error and aborts. As a result, I have a great deal of manual work, deleting these unregistered files, having to restart the install each time. Moreover, using root privileges to delete the unregistered files creates unpleasant opportunities for typos. I had a glance at the macports-users archive, but couldn't find an index. I tried Google, but couldn't find any sensible leads on this. I read "man port", but it's unclear to me exactly what each option does, and I'm concerned that I'll do the wrong thing. 1. Where can I find a fuller explanation of the options to "port" than that given by "man port"? 2. How should I proceed in the light of the difficulties explained in the first paragraph? 3. I am tempted to download the entire Darwinports/Macports tree, but it looks as though this would take ages even without the manual work described above. Comments on these 3 points would be welcome. Thanks a lot David Epstein (David.Epstein@warwick.ac.uk)
On Oct 8, 2007, at 02:37, David Epstein wrote:
I have just started using Macports and I wonder how to get round the following annoying problem. Each port that I download complains about a number of files (between 5 and 35) that are "unregistered". The install stops at every single error and aborts. As a result, I have a great deal of manual work, deleting these unregistered files, having to restart the install each time. Moreover, using root privileges to delete the unregistered files creates unpleasant opportunities for typos.
I had a glance at the macports-users archive, but couldn't find an index. I tried Google, but couldn't find any sensible leads on this. I read "man port", but it's unclear to me exactly what each option does, and I'm concerned that I'll do the wrong thing.
1. Where can I find a fuller explanation of the options to "port" than that given by "man port"? 2. How should I proceed in the light of the difficulties explained in the first paragraph? 3. I am tempted to download the entire Darwinports/Macports tree, but it looks as though this would take ages even without the manual work described above.
Comments on these 3 points would be welcome.
The entire ports tree is already downloaded to your computer. I believe it's usually in /opt/local/var/macports/sources/ rsync.macports.org/release/ports. That's just the portfiles and some patches, not the distribution source archives of each port. Please show us the exact error messages you're getting, and what command you've typed to receive it.
Citando David Epstein :
I have just started using Macports and I wonder how to get round the following annoying problem. Each port that I download
What do you mean by download?
complains about a number of files (between 5 and 35) that are "unregistered". The install stops at every single error and aborts. As a result, I have a great deal of manual work, deleting these unregistered files, having to restart the install each time. Moreover, using root privileges to delete the unregistered files creates unpleasant opportunities for typos.
I had a glance at the macports-users archive, but couldn't find an index. I tried Google, but couldn't find any sensible leads on this. I read "man port", but it's unclear to me exactly what each option does, and I'm concerned that I'll do the wrong thing.
1. Where can I find a fuller explanation of the options to "port" than that given by "man port"?
Fuller, I don't think it exists. Clearer maybe in the new guide http://geeklair.net/new_macports_guide but the man page should be the most exhaustive source.
2. How should I proceed in the light of the difficulties explained in the first paragraph?
You should report which port you are trying to install, what files come in the way (unregistered), at which phase in the installation it happened and who you think installed them. And then either file a ticket on trac.macports.org (after checking that it has not already been reported) either tell the people here.
3. I am tempted to download the entire Darwinports/Macports tree, but it looks as though this would take ages even without the manual work described above.
Downloading the tree means getting the source of macports and the recipes (Portfiles) of the ports. It does not conflict with anything. Installing all the ports on the other hand would really take ages, is impossible (some ports are conflicting with each other and they are supposed to), and has no interest. You should just install what you need or think you may need. Emmanuel
On 8 Oct 2007, at 08:50, Ryan Schmidt wrote:
On Oct 8, 2007, at 02:37, David Epstein wrote:
I have just started using Macports and I wonder how to get round the following annoying problem. Each port that I download complains about a number of files (between 5 and 35) that are "unregistered". The install stops at every single error and aborts. As a result, I have a great deal of manual work, deleting these unregistered files, having to restart the install each time. Moreover, using root privileges to delete the unregistered files creates unpleasant opportunities for typos.
I had a glance at the macports-users archive, but couldn't find an index. I tried Google, but couldn't find any sensible leads on this. I read "man port", but it's unclear to me exactly what each option does, and I'm concerned that I'll do the wrong thing.
1. Where can I find a fuller explanation of the options to "port" than that given by "man port"? 2. How should I proceed in the light of the difficulties explained in the first paragraph? 3. I am tempted to download the entire Darwinports/Macports tree, but it looks as though this would take ages even without the manual work described above.
Comments on these 3 points would be welcome.
The entire ports tree is already downloaded to your computer. I believe it's usually in /opt/local/var/macports/sources/ rsync.macports.org/release/ports. That's just the portfiles and some patches, not the distribution source archives of each port.
Please show us the exact error messages you're getting, and what command you've typed to receive it.
I can't reproduce these errors. I tried installing one or two additional packages and they went through without complaint. Luckily a small amount of evidence survives from my xterm's memory and here it is: hottie:~% sudo port install gnupg ---> Activating gnupg 1.4.7_0 Error: Target org.macports.activate returned: Image error: /opt/local/ share/locale/locale.alias already exists and does not belong to a registered port. Unable to activate port gnupg. Error: Status 1 encountered during processing. hottie:~% sudo rm -i /opt/local/share/locale/locale.alias remove /opt/local/share/locale/locale.alias? y hottie:~% sudo port install gnupg ---> Activating gnupg 1.4.7_0 ---> Cleaning gnupg I think I would have had to rm and restart about 50 times during installation of gnupg, but fortunately I was able to remove a whole lot of files at once, using Unix * wildcard. Don't like using wildcards when I'm root. Since not one single package I have installed has reported that it is up to date, it looks as though I should do something like "sudo port install all", shouldn't I? David David.Epstein@warwick.ac.uk
On 10/8/07, David Epstein <David.Epstein@warwick.ac.uk> wrote:
hottie:~% sudo port install gnupg ---> Activating gnupg 1.4.7_0 Error: Target org.macports.activate returned: Image error: /opt/local/ share/locale/locale.alias already exists and does not belong to a registered port. Unable to activate port gnupg. Error: Status 1 encountered during processing. hottie:~% sudo rm -i /opt/local/share/locale/locale.alias remove /opt/local/share/locale/locale.alias? y hottie:~% sudo port install gnupg ---> Activating gnupg 1.4.7_0 ---> Cleaning gnupg
I think I would have had to rm and restart about 50 times during installation of gnupg, but fortunately I was able to remove a whole lot of files at once, using Unix * wildcard. Don't like using wildcards when I'm root.
Since not one single package I have installed has reported that it is up to date, it looks as though I should do something like "sudo port install all", shouldn't I?
what does "port provides /opt/local/share/locale/locale.alias" tell you? it says it's unregistered or unassociated with any installed port, so I don't think anything will be revealed. Have you installed anything manually (ie, from source w/o MacPorts) on this system? If you haven't got anything /opt/local that isn't owned by MacPorts, you can use "port -f install gnupg" to override any of the issues you're seeing. -- Paul Beard / www.paulbeard.org/ <paulbeard@gmail.com/paulbeard@mac.com>
On Oct 8, 2007, at 03:13, David Epstein wrote:
On 8 Oct 2007, at 08:50, Ryan Schmidt wrote:
On Oct 8, 2007, at 02:37, David Epstein wrote:
I have just started using Macports and I wonder how to get round the following annoying problem. Each port that I download complains about a number of files (between 5 and 35) that are "unregistered". The install stops at every single error and aborts. As a result, I have a great deal of manual work, deleting these unregistered files, having to restart the install each time. Moreover, using root privileges to delete the unregistered files creates unpleasant opportunities for typos.
I had a glance at the macports-users archive, but couldn't find an index. I tried Google, but couldn't find any sensible leads on this. I read "man port", but it's unclear to me exactly what each option does, and I'm concerned that I'll do the wrong thing.
1. Where can I find a fuller explanation of the options to "port" than that given by "man port"? 2. How should I proceed in the light of the difficulties explained in the first paragraph? 3. I am tempted to download the entire Darwinports/Macports tree, but it looks as though this would take ages even without the manual work described above.
Comments on these 3 points would be welcome.
The entire ports tree is already downloaded to your computer. I believe it's usually in /opt/local/var/macports/sources/ rsync.macports.org/release/ports. That's just the portfiles and some patches, not the distribution source archives of each port.
Please show us the exact error messages you're getting, and what command you've typed to receive it.
I can't reproduce these errors. I tried installing one or two additional packages and they went through without complaint. Luckily a small amount of evidence survives from my xterm's memory and here it is:
hottie:~% sudo port install gnupg ---> Activating gnupg 1.4.7_0 Error: Target org.macports.activate returned: Image error: /opt/ local/share/locale/locale.alias already exists and does not belong to a registered port. Unable to activate port gnupg. Error: Status 1 encountered during processing. hottie:~% sudo rm -i /opt/local/share/locale/locale.alias remove /opt/local/share/locale/locale.alias? y hottie:~% sudo port install gnupg ---> Activating gnupg 1.4.7_0 ---> Cleaning gnupg
I think I would have had to rm and restart about 50 times during installation of gnupg, but fortunately I was able to remove a whole lot of files at once, using Unix * wildcard. Don't like using wildcards when I'm root.
${prefix}/share/locale/locale.alias is a tricky file and there have been problems relating to it that have been fixed in other ports. Though I'm not sure what put it on your system in this case, since it's not showing up registered to a port. At any rate, by my count, over 2 dozen ports already include steps to delete locale.alias (and $ {prefix}/lib/charset.alias which is apparently equally tricky) before the destroot phase. Perhaps gnupg should do so as well. (gnupg12 already does.) I'll Cc gnupg's maintainer. For any other ports or files with which you were having similar problems, show us the output.
Since not one single package I have installed has reported that it is up to date, it looks as though I should do something like "sudo port install all", shouldn't I?
You should certainly not "sudo port install all". You do not want to download and compile the source of all 4300+ ports in our tree, not to mention that some ports conflict with other ports so this is impossible anyway, and there would be no reason to do so. You just want to "sudo port install foo" where "foo" is whatever software you actually want to use. What do you mean, "not one single package I have installed has reported that it is up to date"? Do you mean that "port outdated" lists every one of your installed ports? Surely not... But if it does, then you should "sudo port upgrade" each of those ports. Also, remember to "sudo port selfupdate" often to get the latest port definitions.
Paul Beard-2 wrote:
On 10/8/07, David Epstein <David.Epstein@warwick.ac.uk> wrote:
Error: Target org.macports.activate returned: Image error: /opt/local/ share/locale/locale.alias already exists and does not belong to a registered port.
what does "port provides /opt/local/share/locale/locale.alias" tell you? it says it's unregistered or unassociated with any installed port, so I don't think anything will be revealed. Have you installed anything manually (ie, from source w/o MacPorts) on this system? If you haven't got anything /opt/local that isn't owned by MacPorts, you can use "port -f install gnupg" to override any of the issues you're seeing.
-- Paul Beard / www.paulbeard.org/ <paulbeard@gmail.com/paulbeard@mac.com>
Thanks to everyone for very helpful comments. The whole set-up was very mysterious, and has now become much clearer. The material in /opt/local/ was installed by a programmer. I have no idea how he did it, but it was a long time ago, maybe before Darwinports was really up and running, let alone Macports. So macports is refusing to delete these files under automation, and that's obviously the right thing for port to do unless there is a special flag. It is still not clear to me what will happen if I give a command like "port -f install gnupg". Practically NOTHING in my large /opt/local comes from MacPorts, so Paul is suggesting that I should therefore not use -f. But that's exactly WHY I want to use -f. A number of my programs in /opt/local just don't work on my new Intel Mac, so I have to upgrade. What are the dangers of using -f? Would it help me, in view of the fact that the files I want to delete do not come from MacPorts? Or would MacPorts still refuse to delete? I don't like the idea of using a force command without knowing fairly well what damage it might do. You can see why I'm not happy with the output from "man port" which explains -f as "force mode (ignore state file)". I don't know what "state file" means, and man doesn't say whether port's actions are confined to files installed by MacPorts. There must be documentation that says what "state file" means---could a kind person direct me to it? Thanks very much. David Epstein David.Epstein@warwick.ac.uk -- View this message in context: http://www.nabble.com/unregistered-files-modules-tf4586448.html#a13105766 Sent from the MacPorts - Users mailing list archive at Nabble.com.
On 10/8/07, David Epstein <David.Epstein@warwick.ac.uk> wrote:
Paul Beard-2 wrote:
On 10/8/07, David Epstein <David.Epstein@warwick.ac.uk> wrote:
Error: Target org.macports.activate returned: Image error: /opt/local/ share/locale/locale.alias already exists and does not belong to a registered port.
what does "port provides /opt/local/share/locale/locale.alias" tell you? it says it's unregistered or unassociated with any installed port, so I
don't
think anything will be revealed. Have you installed anything manually (ie, from source w/o MacPorts) on this system? If you haven't got anything /opt/local that isn't owned by MacPorts, you can use "port -f install gnupg" to override any of the issues you're seeing.
-- Paul Beard / www.paulbeard.org/ <paulbeard@gmail.com/paulbeard@mac.com>
Thanks to everyone for very helpful comments. The whole set-up was very mysterious, and has now become much clearer. The material in /opt/local/ was installed by a programmer. I have no idea how he did it, but it was a long time ago, maybe before Darwinports was really up and running, let alone Macports. So macports is refusing to delete these files under automation, and that's obviously the right thing for port to do unless there is a special flag. It is still not clear to me what will happen if I give a command like "port -f install gnupg". Practically NOTHING in my large /opt/local comes from MacPorts, so Paul is suggesting that I should therefore not use -f. But that's exactly WHY I want to use -f.
eh, not exactly ;-) but perhaps my meaning was opaque. Now that we know you have some stuff in /opt/local that you don't want to deal with, here's a suggestion. Move it aside (mv /opt/local /opt/local/old), and reinstall MacPorts from scratch. My guess is you'll be home free once you do that. A number of
my programs in /opt/local just don't work on my new Intel Mac, so I have to upgrade. What are the dangers of using -f? Would it help me, in view of the fact that the files I want to delete do not come from MacPorts? Or would MacPorts still refuse to delete? I don't like the idea of using a force command without knowing fairly well what damage it might do.
All it will do is overwrite old files and move aside the old versions of the files it replaces. -- Paul Beard / www.paulbeard.org/ <paulbeard@gmail.com/paulbeard@mac.com>
On Oct 8, 2007, at 17:56, paul beard wrote:
On 10/8/07, David Epstein wrote:
Paul Beard wrote:
On 10/8/07, David Epstein wrote:
Error: Target org.macports.activate returned: Image error: /opt/ local/ share/locale/locale.alias already exists and does not belong to a registered port.
what does "port provides /opt/local/share/locale/locale.alias" tell you? it says it's unregistered or unassociated with any installed port, so I don't think anything will be revealed. Have you installed anything manually (ie, from source w/o MacPorts) on this system? If you haven't got anything /opt/local that isn't owned by MacPorts, you can use "port -f install gnupg" to override any of the issues you're seeing.
Thanks to everyone for very helpful comments. The whole set-up was very mysterious, and has now become much clearer. The material in /opt/ local/ was installed by a programmer. I have no idea how he did it, but it was a long time ago, maybe before Darwinports was really up and running, let alone Macports. So macports is refusing to delete these files under automation, and that's obviously the right thing for port to do unless there is a special flag. It is still not clear to me what will happen if I give a command like "port -f install gnupg". Practically NOTHING in my large /opt/local comes from MacPorts, so Paul is suggesting that I should therefore not use -f. But that's exactly WHY I want to use -f.
eh, not exactly ;-) but perhaps my meaning was opaque.
Now that we know you have some stuff in /opt/local that you don't want to deal with, here's a suggestion. Move it aside (mv /opt/ local /opt/local/old), and reinstall MacPorts from scratch. My guess is you'll be home free once you do that.
A-ha! Revelation! You have things in /opt/local that did not come from MacPorts! (Or maybe it's left over from an old MacPorts or DarwinPorts install which has become disconnected from your current MacPorts install.) Now I'm not surprised at all that you've had so many problems. MacPorts likes to be in almost complete control of its prefix, likes to know what's in it. (It's fine to keep some config files there, but having other software there that MacPorts doesn't know about is not ok.) Paul's advice is good -- move /opt/local out of the way. However, you cannot move a directory into itself. So, try "mv /opt/ local /opt/local-old" Alternately, you could build MacPorts from source and use "./ configure --prefix=/somewhere/else" to tell MacPorts not to use /opt/ local but a different prefix of your choosing. But it might be clearer if you just move your existing /opt/local away and let MacPorts use its defaults.
A number of my programs in /opt/local just don't work on my new Intel Mac, so I have to upgrade. What are the dangers of using -f? Would it help me, in view of the fact that the files I want to delete do not come from MacPorts? Or would MacPorts still refuse to delete? I don't like the idea of using a force command without knowing fairly well what damage it might do.
All it will do is overwrite old files and move aside the old versions of the files it replaces.
Using -f would work... ish... in that it would rename the existing files and then install the new files. But it would be clearer if you start with a clean slate so that you know everything in /opt/local came from MacPorts. Otherwise, as you're installing ports, some ports might start linking against your old libraries in /opt/local and things might continue to break in exciting ways.
You can see why I'm not happy with the output from "man port" which explains -f as "force mode (ignore state file)". I don't know what "state file" means, and man doesn't say whether port's actions are confined to files installed by MacPorts. There must be documentation that says what "state file" means---could a kind person direct me to it? Thanks very much.
Indeed. That's one of the first comments I made on this list years ago. I'm not sure the situation has improved any since then, though the new MacPorts guide may explain it better (I haven't had time to read the new guide yet). On Jul 30, 2005, at 09:53, Ryan Schmidt wrote:
The question was asked before and the answer was to RTFM (referring to the port manpage) and to use "force." But the only thing "man port" says about the "force" option is that it exists, not what it does or when or when not to use it. ([The manpage] says it will "ignore [the] state file" but a casual DarwinPorts user like myself has no idea what that means.)
The DarwinPorts manual also only has a very little to say about "force", and especially the last sentence makes it sound like I should not use it:
"While upgrading you can run into cases when you have to use force (-f). This is especially true if you are upgrading a port that wants to install a file that another port allready (sic) has installed, or if you use the -u option to upgrade (and uninstall) a port that could be installed as a dependency. Allways (sic) remember to use the -f option with caution." [snip] If, as you seem to suggest, using "force" is such an essential component to successfully using DarwinPorts, I would like to suggest that the above section in the manual be extended to explain this use, and to explain the other circumstances in which it would be inadvisable to use "force." As it is, a statement to use it "with caution" is quite flummoxing, as it does not provide sufficient background for the reader to really understand the implications.
The old OpenDarwin archive is gone, but that thread is still here: http://archive.netbsd.se/?ml=darwinports&a=2005-07&t=1110450
On 10/8/07, Ryan Schmidt <ryandesign@macports.org> wrote:
However, you cannot move a directory into itself. So, try "mv /opt/ local /opt/local-old"
Gah, I meant /opt/local.old . . . Alternately, you could build MacPorts from source and use "./
configure --prefix=/somewhere/else" to tell MacPorts not to use /opt/ local but a different prefix of your choosing. But it might be clearer if you just move your existing /opt/local away and let MacPorts use its defaults.
I concur: it will save you some heartache if you just take the default. if for some reason, the stuff you moved aside is needed, write back. -- Paul Beard / www.paulbeard.org/ <paulbeard@gmail.com/paulbeard@mac.com>
Ryan Schmidt-24 wrote:
A-ha! Revelation! You have things in /opt/local that did not come from MacPorts!...[snip]...
MacPorts likes to be in almost complete control of its prefix, likes to know what's in it. (It's fine to keep some config files there, but having other software there that MacPorts doesn't know about is not ok.) Paul's advice is good -- move /opt/local out of the way. However, you cannot move a directory into itself. So, try "mv /opt/ local /opt/local-old"
I'll move /opt/local aside, as you and Paul Beard suggest. But I have the impression that quite a number of non-macports packages want to be placed in /opt/local, and even do so without asking permission. So this could conflict with what you say about MacPorts wanting to keep /opt/local/ to itself. I have certainly been advised by people who know a lot more about software than I do, that downloaded software should go into /opt/local/. David.Epstein@warwick.ac.uk -- View this message in context: http://www.nabble.com/unregistered-files-modules-tf4586448.html#a13129554 Sent from the MacPorts - Users mailing list archive at Nabble.com.
On Oct 10, 2007, at 1:11 AM, David Epstein wrote:
Ryan Schmidt-24 wrote:
A-ha! Revelation! You have things in /opt/local that did not come from MacPorts!...[snip]...
MacPorts likes to be in almost complete control of its prefix, likes to know what's in it. (It's fine to keep some config files there, but having other software there that MacPorts doesn't know about is not ok.) Paul's advice is good -- move /opt/local out of the way. However, you cannot move a directory into itself. So, try "mv /opt/ local /opt/local-old"
I'll move /opt/local aside, as you and Paul Beard suggest.
But I have the impression that quite a number of non-macports packages want to be placed in /opt/local, and even do so without asking permission. So this could conflict with what you say about MacPorts wanting to keep /opt/local/ to itself. I have certainly been advised by people who know a lot more about software than I do, that downloaded software should go into /opt/local/. David.Epstein@warwick.ac.uk -- View this message in context: http://www.nabble.com/unregistered- files-modules-tf4586448.html#a13129554 Sent from the MacPorts - Users mailing list archive at Nabble.com.
David could you be conflating /opt/local and /usr/local . Are you sure your friends "who know a lot" didnt tell you to put downloads in /usr/local?
On Oct 10, 2007, at 00:11, David Epstein wrote:
Ryan Schmidt wrote:
A-ha! Revelation! You have things in /opt/local that did not come from MacPorts!...[snip]...
MacPorts likes to be in almost complete control of its prefix, likes to know what's in it. (It's fine to keep some config files there, but having other software there that MacPorts doesn't know about is not ok.) Paul's advice is good -- move /opt/local out of the way. However, you cannot move a directory into itself. So, try "mv /opt/ local /opt/local-old"
I'll move /opt/local aside, as you and Paul Beard suggest.
But I have the impression that quite a number of non-macports packages want to be placed in /opt/local, and even do so without asking permission. So this could conflict with what you say about MacPorts wanting to keep /opt/local/ to itself. I have certainly been advised by people who know a lot more about software than I do, that downloaded software should go into /opt/local/.
I'm not aware of any software, other than MacPorts, that uses /opt/ local by default. If you know of any, please let us know their names. /usr/local, not /opt/local, is the standard location for user- installed software on a system, and is the default for many packages.
On 10/9/07, William Davis <frstan@bellsouth.net> wrote:
On Oct 10, 2007, at 1:11 AM, David Epstein wrote:
Ryan Schmidt-24 wrote:
A-ha! Revelation! You have things in /opt/local that did not come from MacPorts!...[snip]...
MacPorts likes to be in almost complete control of its prefix, likes to know what's in it. (It's fine to keep some config files there, but having other software there that MacPorts doesn't know about is not ok.) Paul's advice is good -- move /opt/local out of the way. However, you cannot move a directory into itself. So, try "mv /opt/ local /opt/local-old"
I'll move /opt/local aside, as you and Paul Beard suggest.
But I have the impression that quite a number of non-macports packages want to be placed in /opt/local, and even do so without asking permission. So this could conflict with what you say about MacPorts wanting to keep /opt/local/ to itself. I have certainly been advised by people who know a lot more about software than I do, that downloaded software should go into /opt/local/. David.Epstein@warwick.ac.uk -- View this message in context: http://www.nabble.com/unregistered- files-modules-tf4586448.html#a13129554 Sent from the MacPorts - Users mailing list archive at Nabble.com.
David could you be conflating /opt/local and /usr/local . Are you sure your friends "who know a lot" didnt tell you to put downloads in /usr/local?
Actually, /opt is an accepted convention for optional items. I think it evolved for stuff like precompiled binaries, to differentiate them from home-rolled stuff that lived in /usr/local I think moving /opt/local aside and starting a-fresh makes the most sense. If you then add anything by hand (ie, outside the MacPorts framework) you'll know if it collides with something you already have. it's when you have different people mucking about in the same place where you have problems like what you have experienced. -- Paul Beard / www.paulbeard.org/ <paulbeard@gmail.com/paulbeard@mac.com>
participants (5)
-
David Epstein
-
Emmanuel Hainry
-
paul beard
-
Ryan Schmidt
-
William Davis