fuse4x sshfs on macosx execution error - macos

I'm using sshfs on macosx 10.7 in my every day job.
To install sshfs I have used macport: "port install fuse4x sshfs".
The todays error:
$ sshfs user#domain.com:/path myfolder
fuse4x client library version is incompatible with the kernel extension (kext='0.9.0', library='0.9.2').
Any tips welcomed. I don't understand, I have not updated the system.

Follow
$ brew info fuse4x-kext
instructions:
In order for FUSE-based filesystems to work, the fuse4x kernel
extension must be installed by the root user:
$ sudo /bin/cp -rfX /usr/local/Cellar/fuse4x-kext/0.9.2/Library/Extensions/fuse4x.kext /Library/Extensions
$ sudo chmod +s /Library/Extensions/fuse4x.kext/Support/load_fuse4x
If upgrading from a previous version of Fuse4x, the old kernel
extension will need to be unloaded before performing the steps listed
above. First, check that no FUSE-based filesystems are running:
$ mount -t fuse4x
Unmount all FUSE filesystems and then unload the kernel extension:
$ sudo kextunload -b org.fuse4x.kext.fuse4x

tl;dr:
try to manually update fuse4x-kect after updating the ports' tree using sync verb
port sync
port upgrade fuse4x-kext
Longer read
The error you pasted means that somehow macports didn't update the kext port fuse4x-kext when it upgraded fuse4x, it should have. I doubt your issue is still actual, since you're likely to have updated since october 2012, you should perform regular ports' upgrades and check when a new macports version is out in order to run a selfupdate verb.
As future reference you can guess what the kext port for a port is by looking at its information
port info fuse4x
or list of dependencies:
port deps fuse4x
Ports offering kexts can be loaded and unloaded from kernel by using load and unload verb.

Related

Using Macport on OSX 10.9

I installed macport following the guide.
http://afitnerd.com/2011/09/06/headless-browser-testing-on-mac/
However, when I try to run
sudo port upgrade
it has error message
Can't map the URL 'file://.' to a port description file ("Could not
find Portfile in /Users").
Please verify that the directory and portfile syntax are correct.
To use the current port, you must be in a port's directory.
How should I switch to the right directory?
sudo port upgrade tells MacPorts to upgrade the port defined by the Portfile in the current directory. It's usually a command only developers use while writing Portfiles. The guide likely meant sudo port upgrade outdated instead to upgrade all non-current ports. Since you don't have any ports installed if this is your first MacPorts installation, you can safely skip the command.
Note that firefox-x11 has meanwhile been removed from MacPorts because it was broken, outdated, and nobody stepped up to maintain it.

Why can't I setup an SSHFS share? “OSXFUSE file system is not available” error

I'm trying to setup an SSHFS share from my local machine to a remote machine, but it is not working. I'm getting the error OSXFUSE file system is not available (see below). How to fix this??
FYI, my local machine is a MacBook Pro laptop running OSX 10.9.3. The remote machine is actually a VirtualBox on the same hardware running CentOS.
% brew install sshfs # <---- SSHFS is installed
Warning: sshfs-2.5.0 already installed
% brew install osxfuse # <---- OSX Fuse is installed
Warning: osxfuse-2.6.4 already installed
% ssh remote_user#XXX.XXX.XXX.XXX # <---- See, SSH works!!
Last login: Wed Jun 18 18:36:11 2014 from XXX.XXX.XXX.XXX
[remote_user#XXX.XXX.XXX.XXX ~]% exit
% sudo mkdir /mnt
% sudo mkdir /mnt/Share
% sudo sshfs -o IdentityFile=~/.ssh/id_rsa.pub remote_user#XXX.XXX.XXX.XXX:/ /mnt/Share
the OSXFUSE file system is not available (-1)
the OSXFUSE file system is not available (1)
I tried solution described here. But it didn't work for me:
% sudo kextunload -b com.github.osxfuse.filesystems.osxfusefs
(kernel) Kext com.github.osxfuse.filesystems.osxfusefs not found for unload request.
Failed to unload com.github.osxfuse.filesystems.osxfusefs - (libkern/kext) not found.
If you run brew info osxfuse and follow the instructions to the letter, I believe it would work.
From what You described, you just tried unloading the (possible) previous kernel extension, but did not complete the last important step to actually install the new extension.
This is what brew info osxfuse tells me:
If upgrading from a previous version of osxfuse, the previous kernel extension
will need to be unloaded before installing the new version. First, check that
no FUSE-based file systems are running:
mount -t osxfusefs
Unmount all FUSE file systems and then unload the kernel extension:
sudo kextunload -b com.github.osxfuse.filesystems.osxfusefs
The new osxfuse file system bundle needs to be installed by the root user:
sudo /bin/cp -RfX /usr/local/opt/osxfuse/Library/Filesystems/osxfusefs.fs /Library/Filesystems
sudo chmod +s /Library/Filesystems/osxfusefs.fs/Support/load_osxfusefs
There appears to be a problem loading the KEXT installed by the regular osxfuse Homebrew package. You can use brew cask to install the official FUSE for OS X build from their own DMG:
brew rm osxfuse
brew install caskroom/cask/brew-cask
brew cask install osxfuse
SSHFS itself is also available as a Cask package, though on my system mixing osxfuse from Cask with plain sshfs binary bottle works just fine.
The downside to this approach is that brew upgrade or brew outdated will no longer be able to update FUSE for OS X as brew cask is not version-aware for now.
I have observed that OSXFUSE is a bit tricky, though I don't know exactly why, and brew tries to avoid changing the system, so using it to manage kernel extensions is not a good idea. I suggest using the packaged installers for OSXFUSE and SSHFS from http://osxfuse.github.io/ instead of using brew.
Open System Preferences, choose FUSE, then update to the latest version. Thats what worked for me.
The problem when installing SSHFS with brew is that osxfusefs is not signed: the Console outputs com.apple.kextd: ERROR: invalid signature for com.github.osxfuse.filesystems.osxfusefs, will not load. See also https://github.com/osxfuse/osxfuse/issues/122.
The binary for OSXFUSE from http://osxfuse.github.io/ (as suggested by the answer of Old Pro) does not have this problem, and therefore installing this one instead resolved it for me.

Setup Macports on an offline machine

I need to install dpkg for my mac and the easiest way I have seen for doing that is to install Macports. Unfortunately the machine I want to install it on is not connected to the internet.
Is there a way to download dpkg and its dependencies for macports and install the packages on the offline machine?
I have seen people mention to set it up on an online machine and move the whole macports folder, however the only machine I have online is running a different OSX version which could cause issues.
Thanks in advance.
You could try to download all sourcefiles using
sudo port fetch rdepof:dpkg
and then copy everything in (/opt/local/var/macports/distfiles/) to the offline machine and put it in the same folder there.
Then you should be able to build dpkg using
sudo port install -s dpkg
The -s option forces macports to build from source. (Prevent MacPorts from installing pre-built package?)

How to create .deb packages on Mac OS X

I am trying to upload my app on Cydia and it requires .deb package. I am unable to figure out how to make .deb packages on mac. I am using 10.6.3 when I write this command on terminal
dpkg-deb -b MyProgram
Terminal output is
-bash: dpkg-deb: command not found
I've install fink, Mac ports insert Mac DVD to find out but nothing helps.
It's available on Homebrew:
brew install dpkg
If you don't have Homebrew installed, go to brew.sh. It's a simple one-liner to install.
Homebrew is less invasive, less complicated, and more popular than Macports or similar.
I installed mac ports 1.7 through terminal as no package is available.
After that I installed Mac ports 1.9 through installer.
Then goto this path /opt/local/bin and run sudo port selfupdate
after that execute sudo port install dpkg
it will take some time and after that your dpkg is successfully configured.
Run this command sudo dpkg-deb -b MyProgram to make MyProgram.deb
Note MyProgram should contain DEBIAN folder and under that control file remove txt extention
Below is control file
Website: www.zeeshanullah.com
Maintainer: zeeshanullah <zzeeshann#gmail.com>
Name: Snapture
Package: zeeshanullah
Section: zeeshanullah
Version: 2.x.x
Architecture: iphoneos-arm
Description: GPS joke.
Sponsor: zeeshanullah.com <zeeshanullah>
dont forget to place a new line at the end of control file otherwise you will get an error.
You need Xcode installed on your system before using mac ports - you find it on the second mac DVD, I think. After that, you can install mac ports and then via the Terminal type "sudo port install dpkg", press return and enter your password. It may take some time to compile. You tried that?
Best option is to use FPM and you can create it in 50 secs:
fpm
i think these links can be useful for you:
How to make a deb on mac
Using ant to create deb

dyld: Library not loaded error when running command in terminal

When running some commands in the terminal, I get the following error message
dyld: Library not loaded: /opt/local/lib/libjpeg.62.dylib
Referenced from: /opt/local//lib/libTIFF.dylib
Reason: no suitable image found. Did find:
/opt/local//lib/libjpeg.62.dylib: can't map
/opt/local/lib/libjpeg.62.dylib: can't map
Trace/BPT trap
My xcode is up to date.
As your paths begin /opt/local I assume you are using macports
If so I think you need to at least do a sudo port selfupdate as the current tiff port depends on /libjpeg.7.dylib.
Possible a complete reinstall is needed if the macports was installed under Leopard or earlier
After you do your
sudo port selfupdate
don't forget to do a
sudo port upgrade outdated
to upgrade your existing ports. Much better than reinstalling everything :-)
On my Leopard machine using macports, libsdl_image was looking for this non-installed jpeg lib. The jpeg6b port includes it, but at a different path (/opt/local/lib/jpeg6b/lib/libjpeg.62.dylib). I fixed it by doing
port selfupdate
port install libsdl_image
which upgraded libsdl_image from 1.2.8_0 to 1.2.10_2 and made the problem go away.
I had the same problem. I have never runned anything else than Snow Leopard. I have tried all kind of stuff and used about 10 hours trying to fix this problem, but with no success.
I ended up removing macports completely and installed it again.
This is what I did:
First I got a list of all my installed ports:
> port installed
Then I uninstalled everything:
> sudo port -f uninstall installed
And installed macports again: macports and installed all my packages again.
It was rather tedious, but it did the trick.

Resources