MacBook Pro camera not working on Ubuntu 18.04

I've tried the solution on this website https://medium.com/@racter/how-to-install-ubuntu-16-04-on-a-retina-macbook-11-2-74e7779c0e47:

$ cd /etc/local/src
$ git clone https://github.com/patjak/bcwc_pcie.git
$ cd bcwc_pcie/firmware
$ sudo make
$ sudo make install
$ cd ..
$ sudo make
$ sudo install
$ sudo depmod
$ sudo modprobe -r bdc_pci
$ sudo modprobe facetimehd

However, I get the following error after the first sudo make.

Checking dependencies for driver download...
/usr/bin/xzcat
/bin/cpio
Makefile:34: recipe for target 'AppleCameraInterface' failed
make: *** [AppleCameraInterface] Error 1

Solution 1:

Update
The firmware repository was moved to a separate repository. The procedure now is

cd /etc/local/src
git clone https://github.com/patjak/bcwc_pcie.git
cd bcwc_pcie/firmware
git clone https://github.com/patjak/facetimehd-firmware
cd facetimehd-firmware
sudo make
sudo make install
cd ../..
sudo make
sudo make install   # (Update with make install for 18.04)    
sudo depmod
sudo modprobe -r bdc_pci
sudo modprobe facetimehd

Solution 2:

Try installing curl. I also got the same problem and then I figured out that it is because curl is not installed default in Ubuntu 18.04.

sudo apt-get install curl

Solution 3:

Can confirm this works on Macbook Pro 13 mid 2014. My src folder was in /usr/local

Doesn't run after reboot. Apparently need to update the /etc/modules file but I don't what to enter??

Edit: To get webcam working after boot, in terminal:

  1. sudo nano -w /etc/modules or sudo gedit /etc/modules
  2. add 'facetimehd' on a new line (without quotes).
  3. Save and reboot..

Solution 4:

If it still gives error try the following for ubuntu 18.04 , Macbook pro worked like a charm

cd /etc/local/src
$ git clone https://github.com/patjak/bcwc_pcie.git
$ cd bcwc_pcie/firmware
$ sudo make
$ sudo make install
$ cd ..
$ sudo make
$ sudo make install   (Update with make install for 18.04) 
$ sudo depmod
$ sudo modprobe -r bdc_pci
$ sudo modprobe facetimehd