# Portmap is blocking nfs-utils[solved]

## scott45

When I try to emerge nfs-utils so I can mount an nfs share I get the following block:

[blocks B     ] net-nds/portmap ("net-nds/portmap" is blocking net-fs/nfs-utils-1.2.3-r1)

 * Error: The above package list contains packages which cannot be

 * installed at the same time on the same system.

  (net-fs/nfs-utils-1.2.3-r1, ebuild scheduled for merge) pulled in by

    nfs-utils

  (net-nds/portmap-6.0, installed) pulled in by

    net-nds/portmap required by @selected

Has something changed regarding how these programs work or is it a version issue?Last edited by scott45 on Wed Apr 20, 2011 12:45 am; edited 1 time in total

----------

## skellr

nfs-utils-1.2.x will use rpcbind instead of portmap so i'd unmerge portmap and let it pull in rpcbind.

Edit: If something that you have installed complains about needing portmap you might try updating it from stable to the testing version also.

----------

## scott45

Thanks, I'll give that a shot.

----------

## scott45

Worked. Thanks!!   :Very Happy: 

----------

## nichocouk

 *skellr wrote:*   

> nfs-utils-1.2.x will use rpcbind instead of portmap so i'd unmerge portmap and let it pull in rpcbind.
> 
> Edit: If something that you have installed complains about needing portmap you might try updating it from stable to the testing version also.

 

Thanks - it works for me too. 

I was a bit cautious as I need ypbind which has either portmap or rpcbind as its dependencies, but removing portmap and pulling in rpcbind seems to be as easy as it could be.

----------

## dvh

I tried this fix...everything emerges just fine, but when I try to start nfs, I get this"

```
myth ~ # /etc/init.d/nfs start

 * Caching service dependencies ...

 *  Cannot add provide 'portmap', as a service with the same name exists!                                                                                 [ ok ]

 * Starting portmap ...

/sbin/start-stop-daemon: stat /sbin/portmap: No such file or directory (No such file or directory)                                                        [ !! ]

 * Starting portmap ...

/sbin/start-stop-daemon: stat /sbin/portmap: No such file or directory (No such file or directory)                                                        [ !! ]

 * ERROR:  cannot start rpc.idmapd as portmap could not start

 * Starting portmap ...

/sbin/start-stop-daemon: stat /sbin/portmap: No such file or directory (No such file or directory)                                                        [ !! ]

 * ERROR:  cannot start rpc.statd as portmap could not start

 * ERROR:  cannot start nfs as portmap could not start
```

seems that something still wants portmap.  How might I resolve this?

-dvh

----------

## cach0rr0

did you forget to run etc-update after emerge finished? 

included in those updates should be a new init script, which does not use portmap

it will not automatically clobber your old init script; this is where etc-update (or dispatch-conf) comes in

----------

## dvh

I'm sure that I ran dispatch-conf, but I am not sure how I dispositioned this one.  Either way, I currently have no outstanding unprocessed updated config files.  I tried to rerun the emerge (of rpcbind), but I do not get the message regarding config files that need processing.  how do I redo this to get another shot?

-dvh

----------

## deadearth

I'm hitting the exact same issue.  Any ideas??

----------

## cach0rr0

 *deadearth wrote:*   

> I'm hitting the exact same issue.  Any ideas??

 

unmerge portmap, emerge the new build of nfs-utils

you should no longer have a 'portmap' init script

if you look at the init script for rpcbind, you should see:

```

        provide portmap

```

If you have this, and you're having issue starting things up because it complaints something already provides portmap, remove /etc/init.d/portmap (it too, will have a 'provide portmap' line, which is the crux of the problem)

----------

## deadearth

Ahhhh,  I was confused because i had a portmap initscript but the portmap package was not installed.  an "equery belongs" on the initscript turned up nothing, so i'm not sure why it was still there.  I just moved it out of the way (and removed it from rc-update, and now everything is good.)

Thanks!

----------

## cach0rr0

 *deadearth wrote:*   

> Ahhhh,  I was confused because i had a portmap initscript but the portmap package was not installed.  an "equery belongs" on the initscript turned up nothing, so i'm not sure why it was still there.  I just moved it out of the way (and removed it from rc-update, and now everything is good.)
> 
> Thanks!

 

aye, that's one trick with portage and really any other package management system, they dont always remove everything with a mind of erring on the side of caution. Init scripts are a perfect example of this - you will find it's not at all uncommon for unmerging a package to result in the init script for the package not being removed. 

In this case it helps to know a bit of the general layout of an init script, and what lines like 'need foo' or 'provide bar' mean. These be dependencies for init scripts!

----------

## pgu

 *cach0rr0 wrote:*   

> 
> 
> included in those updates should be a new init script, which does not use portmap

 

Are you saying that ypbind does not depend on portmap anymore? It seem to be a dependency when I try to emerge ypbind.

So we have to emerge ypbind (which pulls in portmap) and then unmerge portmap until this dependency is fixed?

----------

## krinn

Didn't read the thread, but solve might be easier with just

emerge --nodeps ypbind

----------

## pgu

I can't get nfs started:

```
# /etc/init.d/nfs start

 * Starting NFS mountd ...                                                                              [ !! ]

 * Starting NFS daemon ...                                                                              [ ok ]

 * Starting NFS smnotify ...                                                                            [ ok ]

 * ERROR: nfs failed to start

```

I had to emerge ypbind, emerge -C portmap, emerge rpcbind, emerge nfs-utils

Is this the correct method at present?

----------

## pgu

Ignore my last error message. This was due to nfs4 support in my kernel.

----------

## Yak

I'm sorry but how is this solved??

```
ariadne yak # egrep -i "header|portmap" /etc/init.d/nfs

# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfs.initd,v 1.24 2011/04/06 22:11:39 vapier Exp $

        need portmap rpc.statd ${myneed} ${NFS_NEEDED_SERVICES}

ariadne yak # emerge -pv ypbind nfs-utils rpcbind

 * IMPORTANT: config file '/etc/portage/package.use' needs updating.

 * See the CONFIGURATION FILES section of the emerge

 * man page to learn how to update config files.

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R   ] net-nds/rpcbind-0.2.0  0 kB

[ebuild   R   ] net-nds/ypbind-1.32  USE="nls -slp" 0 kB

[ebuild   R   ] net-fs/nfs-utils-1.2.3-r1  USE="ipv6 nfsv3 nfsv4 tcpd -caps -kerberos" 0 kB

Total: 3 packages (3 reinstalls), Size of downloads: 0 kB

 * IMPORTANT: 14 news items need reading for repository 'gentoo'.

 * Use eselect news to read news items.

ariadne yak # /etc/init.d/nfs start

 * ERROR:  cannot start nfs as portmap could not start

```

rpcbind was already installed and installing ypbind solves nothing. But I also get

```
ariadne yak # /etc/init.d/ypbind start

 * Starting ypbind ...

domainname not set - aborting.                                            [ !! ]

```

But why would I want to run a NIS service anyway?

----------

## cach0rr0

 *pgu wrote:*   

> 
> 
> Are you saying that ypbind does not depend on portmap anymore? It seem to be a dependency when I try to emerge ypbind.
> 
> So we have to emerge ypbind (which pulls in portmap) and then unmerge portmap until this dependency is fixed?

 

no, I'm saying the "rpcbind" package provides portmap now, and not the "portmap" package. 

to that same end, the init scripts have been updated accordingly:

look at the init script for portmap (/etc/init.d/portmap), notice the "provides portmap"

look at the init script for rpcbind (/etc/init.d/rpcbind), notice that it too has "provides portmap"

Notice the description for the rpcbind package:

 *Quote:*   

> 
> 
> [I] net-nds/rpcbind
> 
>      Available versions:  0.2.0 **9999
> ...

 

Not all that uncommon. For another example of this, look at the lvm2 package, which now provides what the device-mapper package used to provide. So, even if you dont use lvm, if you use device-mapper you still need the lvm2 package.

----------

## Yak

Well I must be missing something BECAUSE NFS STILL REFUSES TO START WITHOUT PORTMAP. NFS DOESN'T CARE IF RPCBIND IS RUNNING OR NOT.

I tried everything I could think of on my first system to get it to start, but it just wouldn't. Rpcbind init script may say it provides portmap but it just wasn't working on my system. I dunno, I'm going to get into this on other systems so I will look at it again when it's not a system that runs nfs 24/7. So far my solution has been to mask nfs-utils-1.2.3-r1

----------

