I see you use sudo in one of your
winetricks commands: that could be the main problem, as sudo shouldn't be used with
winetricks (only when running
sudo apt-get install wine); see my comment at the end of my post.*
When I successfully installed d3dx9 to a separate wine prefix, which I see you are also using, I used the below command in the terminal.
WINEPREFIX=$HOME/.myprefixname winetricks d3dx9
This is part of the voluminous output I got from the command using the
Executing cabextract -q -d /home/mike/.myprefixname/dosdevices/c:/windows/system32 -L -F d3dx9*.dll /home/mike/.myprefixname/dosdevices/c:/windows/temp/_d3dx9/apr2006_d3dx9_30_x86.cab
You must change
.myprefixname to the name of your own prefix; for more explanation of wine prefixes and their use, please see this question.
You only need to specify
WINEARCH=win32 or the 64bit equivalent when you create the prefix, as it can't be altered afterwards, as noted at WineHQ.
Wine will also refuse to load if you specify a different
WINEARCH to the one you created it with.
Just entering in terminal
winetricks d3dx9 would instead install directX to your default
*It is most important to note that when installing things with
winetricks or using
wine, you don't need to use sudo, as you are not installing the files to the system, but to your Wine folder or separate wine prefix in your home folder. Using sudo might cause the problem you are experiencing with paths, as is noted on the actual link given. In the WineFAQ it notes that
Running with sudo...has the added bonus of breaking the permissions on your ~/.wine folder in the process. If you have run Wine with sudo you need to fix the permission errors... and then run winecfg to set Wine up again.
So, I should also check your permissions and refer to the WineFAQ article, as you will need to reset your permissions even if you reinstall
wine. If you have used sudo with
wine and now root owns some of the files, you will need to change the permissions by running the following commands from the WineFAQ:
sudo chown -R $USER:$USER .wine
.wine with your prefix if you use a
WINEPREFIX or use the command for both your
.wine folder and your prefix if you have both.