Problem
You upgraded your MBWE firmware to 2.00.15 and lost gcc.
1st Solution
If you tried to restore gcc by copying /usr from a backup and failed this should get you up and running.
I made several mistakes the first time around:
1. I unzipped SDA1FILE.TAR.gz on my windows PC. This does not work!
2. I copied the files to my PUBLIC share on the MBWE and then attempted to do the restore from there. This does not work!
Here are the steps to clean up the previous failed attempt and start over with a procedure that works:
- if you have not made a previous attempt to restore /usr from backup skip steps 4-7 *
1. log in to your MBWE as root or su when you're in whit an other user
2. Make sure your at the root level, # cd /
3. Run this commands one by one
find /usr -name '*gcc*'
find /usr -name '*g++*'
find /usr -name '*c++*'
4. Delete all files and directories found by those three commands that are in /usr and sub directories of /usr with:
rm -r -f <path to file/dir name>
( WARNING this step is dangerous. Please think twice before deleting files or ask other more experienced users in case of confusion. In all cases making backup first - before deletion - sounds reasonable ) .
and repeat steps 3-4 to verify they are all gone.
5. Backup your /usr dir with:
tar -czvf usr.tar.gz /usr
6. create an directory like /tmp/sda1 whit this command: mkdir /tmp/sda1
7. Download the backup image to your PC: http://www.stmaryscrewe.org.uk/wdmbwe/WD_MYBOOK_WE_500GB_FILE.7z
8. Unzip it. izarc Works greate.
9. Copy SDA1FILE.TAR.gz to your MBWE PUBLIC share. Winscp or samba works
10. Copy the file to the /tmp/sda1 directory and cd to /tmp/sda1
cp /shares/internal/PUBLIC/SDA1FILE.TAR.gz /tmp/sda1/SDA1FILE.TAR.gz
cd /tmp/sda1
11. Extract the archive:
tar -xzvf SDA1FILE.TAR.gz
12.*UPDATED* copy the backup files: cp -r -p -u -T /tmp/sda1/usr /usr
From this point on gcc is working and I did not restore the backup I made of /usr in step 5.
I tested this by installing ncurses and nano the long way and ./configure, make and make install all work :)
I rebooted the MBWE to make sure everything still works, success!
When you're satisfied you can remove the /tmp/sda1 dir: rm -r -f /tmp/sda1
You can keep or delete usr.tar.gz from the root dir, it's up to you. I'm keeping mine.
2nd Solution…
Installing GCC in Optware
(As of 2010/02/15 the gcc package seems to be missing in optware - at least for mbwe-bluering)
(For mbwe white light: see forum topic [http://mybookworld.wikidot.com/forum/t-256393/gcc-compiler-in-optware])
as other regular packages install gcc through Optware this should install in /opt/bin folder
/opt/bin/ipkg install gcc
after successful installation try
/opt/bin/gcc -dumpversion
the above will report the version of the gcc compiler
but still if you try to compile other packages you will be reported as gcc not found as gcc is installed to /opt/bin.
To run applications in /opt/bin/ without having to type "/opt/bin/<whatever>" every time, edit your /root/.bashrc and /etc/profile and add the following line to the bottom of each:
export PATH=$PATH:/opt/bin
this will make all installed optware Applications to be launched by just the application name