Solved Firefox refusing to start...

Just after I installed Mahjong from the ports via /usr/ports/games/mahjong, I can no longer start my default web browser, which is Firefox.

I am now getting the error message "Failed to execute default web browser. Input/output error." This appeared after I had attempted to install Mahjong by pkg install mahjong from the /usr/ports/games/mahjong directory.
The error message persists even after I deinstalled mahjong.

Can anyone explain this and help me fix it?

Ken Gordon
 
Last edited:
Did you install Mahjong from ports or did you use a package? I ask because I don't understand this statement: "This appeared after I had attempted to install Mahjong by pkg install mahjong from the /usr/ports/games/mahjong directory".
There is no need to be in a particular directory when installing a package using the command pkg install <package name>.

What happens when you run firefox from a command terminal? What output do you get?
 
Did you install Mahjong from ports or did you use a package?
I did it from a package.
I ask because I don't understand this statement: "This appeared after I had attempted to install Mahjong by pkg install mahjong from the /usr/ports/games/mahjong directory".
There is no need to be in a particular directory when installing a package using the command pkg install <package name>.
I was not sure about that, so just to be safe, I always move to the directory in /usr/ports which contains the desired package/port before doing a pkg install <package-name>

Which brings up another question I have: what, exactly, is the difference between installing a particular package/port by cd-ing to the directory containing the package in /usr/ports and doing a make install or make install clean, and doing a pkg install <package_name>. The reason I ask is that when I do a pkg install epson-inkjet-printer-escpr, the resulting files do not contain the driver I need for my Epson XP-830 when installing my printer by CUPS, but when I do it from make install clean, I do get that necessary PPD, although I have to look for it.

What happens when you run firefox from a command terminal? What output do you get?

I have not yet done that, but if the problem shows up again, I'll do that and report here. What I have done to clear that error is to begin from scratch and completely reinstall the complete operating system and the apps I need, but without attempting to install Mahjong.

Thanks.

Ken Gordon
 
So, short primer:

The pkg command installs pre-compiled packages from a FreeBSD repository. These have nothing to do with the /usr/ports directory or "tree" you have on your system. As a matter of fact, if you only use packages, you have no need of the /usr/ports files at all but they don't hurt anything, they just take up some space.

Installing from ports involves compiling each port and its dependencies. The directories for these are under /usr/ports as you have discovered. The only advantage to installing from ports is the ability to customize the options of each port. These ports compile into into a package which gets installed as such.

My advice to you is to is you use packages if you are a new user and getting familiar with FreeBSD. Also, DO NOT mix ports and packages or you will/may have dependency issues. Ports are newer than packages so a given port may depend on a newer version of a library or other dependency that the package system doesn't have available.

Keep in mind there is also no need to reinstall the OS because of an issue with a package. The OS is separated from the software you install. This OS is not at all like Linux in that regard. All software in FreeBSD that is installed by the end user goes under /usr/local.

Hope that helps. There are (extensive) threads here on using ports and packages so you should be able to find answers to any other questions you may have. If not, ask away and we'll be happy to help.
 
So, short primer:

The pkg command installs pre-compiled packages from a FreeBSD repository.
Yes. I understood that. Yet, the Handbook does not make clear what, exactly, is the difference in the result.
These have nothing to do with the /usr/ports directory or "tree" you have on your system.
Again, this is not made clear, at least not from the discussion of the use of ports in the Handbook.
As a matter of fact, if you only use packages, you have no need of the /usr/ports files at all but they don't hurt anything, they just take up some space.
OK. I was not sure about that either, but, of course, it makes sense.

Installing from ports involves compiling each port and its dependencies. The directories for these are under /usr/ports as you have discovered. The only advantage to installing from ports is the ability to customize the options of each port. These ports compile into into a package which gets installed as such.
Well, it is the dependencies I think I am having a problem with when I install from the port: the dependencies appear to be included in the package, but are not included when installing from the port. Am I correct in this? At least this is what it appears to me when I install. For instance, I find that in order to get CUPS to work correctly, I have to install it from the package, but in order for me to get the driver for my Epson XP-830 printer I need, I have to install that from the port, since, apparently, the package does not include that particular driver.

My advice to you is to use packages if you are a new user and getting familiar with FreeBSD.
Well, I am not a new user of FreeBSD in the sense you mean. I used FreeBSD for many years when I was working at the University of Idaho. I used it to build and operate a web and e-mail server for the Department for which I was working until Computer Services finally implemented those services for the entire University. I also supported an HP-UX server. However, I was never really very good at Unix-type systems, not having enough time to devote strictly to that due to my other duties. Now I am 77, and want to get back into FreeBSD in more depth. I built and support 6 computers in our home, am not totally pleased with Windoze and am investigating using FreeBSD instead. In addition, I have been tasked by our local ham club to set up and operate some laptops for use on Field Day and for digital work. The club cannot afford to buy individual Win10 instances for their old laptops, so I am doing FreeBSD for them. So far, it is working very well.

Also, DO NOT mix ports and packages or you will/may have dependency issues.
I have worried about that...but see above. :)
Ports are newer than packages so a given port may depend on a newer version of a library or other dependency that the package system doesn't have available.
I had suspected that, but thank you for confirming that for me. I appreciate it.

Keep in mind there is also no need to reinstall the OS because of an issue with a package. The OS is separated from the software you install. This OS is not at all like Linux in that regard. All software in FreeBSD that is installed by the end user goes under /usr/local.
OK, That is good to know. Even so, I need the practice installing FreeBSD anyway, so I don't feel I have lost anything but a bit if time doing it the way I did.

Hope that helps. There are (extensive) threads here on using ports and packages so you should be able to find answers to any other questions you may have. If not, ask away and we'll be happy to help.
Thank you. I have also downloaded the entire Handbook, but it is HUGE, and so I am only printing off what I consider to be immediately necessary at the moment. Thank you very much for your help and advice. I very much appreciate it.

Ken Gordon
 
I have also downloaded the entire Handbook, but it is HUGE

Another good reference book to have is, Absolute FreeBSD: The Complete Guide to FreeBSD, 3rd Edition by Michael W. Lucas... It is a little pricy, but maybe your local library can help you find a copy... That way you can read through it and see if you think it is worth the investment for you before you buy...
 
What happens when you run firefox from a command terminal? What output do you get?

"Error: no DISPLAY environment variable specified."

This error pops up after I have run pkg install hplip, during which I see that Firefox is updated from ver 70 yada yada to ver 72 yada yada.

After that, I can no longer run any web browser.

Ken Gordon
 
I have done some more research: that error message I mention above occurs when I am logged in as root. Checking the env, there is no DISPLAY mentioned there. When I exit root, then try firefox, I get "Segmentation fault (core dumped)". The environment for the non-root user shows DISPLAY=:0.0

I have then tried to uninstall firefox, deleted the file from /usr/local/bin and tried to install firefox from both the package, and from the port. Still no joy.

I also bought that book mentioned above.

Ken Gordon
 
  • Like
Reactions: bjs
Ken - referencing your earlier post: dependencies for packages are packages themselves and are not "bundled" with a given package. For example, say Firefox needs a library as a dependency. You run pkg install firefox and the package containing the needed dependency is automatically installed along with the Firefox package. Make sense?

I am sure you know this but never run X as root. May apps will simply not run this way and it is not a good practice from a security perspective .
 
Ken - referencing your earlier post: dependencies for packages are packages themselves and are not "bundled" with a given package. For example, say Firefox needs a library as a dependency. You run pkg install firefox and the package containing the needed dependency is automatically installed along with the Firefox package. Make sense?
Yes. I have watched the installation process and have seen that.

BTW, at this point, I suspect I may have a bad hard-drive. That "segmentation fault" error message may be an indication. The computer has been running steadily, except for some few and infrequent shutdowns, for at least 10 years since I built it. I never turn it off, and I am sure it is getting tired at this point. I am going to replace the HD with another asap and try again. I think the HD, a 250 GB Seagate, is at least 10 years old, and very probably older. I really should upgrade that computer, but it has been so reliable, I hesitate to do that. After all, if it ain't broke, don't fix it. Right? :)

Another reason I suspect the HD is that I am using exactly the same procedures with this computer as I did with the old laptop I built for our local ham club and that worked perfectly. In addition, these problems appear both intermittently and spontaneously: one minute everything works, the next minute they don't.

I am sure you know this but never run X as root. Many apps will simply not run this way and it is not a good practice from a security perspective .
Yes. I had inadvertently been logged in as root when I checked the environment the first time. Thanks again.
 
Gee. The smallest HD I can find locally is a 1 TB. Seems much too big for this project. When I first dealt with a "microcomputer" back in about 1970 or so, 1 kB of RAM cost $1500.00 and a "HUGE" 5 MB HD cost $4995.99.

My, how times do change.

Ken Gordon
 
Yes sir they do! I have 2 SSDs in my main FreeBSD desktop: a 256GB for the OS and a 500GB for my user's /home. I backup to my 4TB NAS. Drive space is. cheap these days. The SSD prices have come way down and SSDs are orders of magnitude faster than spinning drives. I use NAS spinning drives for backup though. I guess I still have a feeling they are longer lasting but my SSDs are over 3 years old and only show very minimal wear.
 
I started with make install clean, then ports-mgmt/portupgrade, moved to ports-mgmt/portmaster stayed with it and been using it for years now. It pulls in all the dependencies and lists them before you start the build. It makes things easier IMO and if you can make out the fail point in doing it manually you can work out one if it stops. That doesn't happen often though.

I would give that try to see if it didn't result in fewer problems.
 
The SSD prices have come way down and SSDs are orders of magnitude faster than spinning drives.

Yeah pretty amazing, even the more expensive brand names are pretty cheap now and 256GB drives are still abundant. You do have to love how fast they are, especially NVMe. Though the mechanicals still have longevity on them, I have yet to wear out an SSD even doing a lot of stuff with large files such as encoding video for my library.
 
Another good reference book to have is, Absolute FreeBSD: The Complete Guide to FreeBSD, 3rd Edition by Michael W. Lucas... It is a little pricy, but maybe your local library can help you find a copy... That way you can read through it and see if you think it is worth the investment for you before you buy...

My copy arrived today. All I can say is "Wow!!!!" I wish I had had this book some 20 years ago! Thanks for pointing me to it.

Ken Gordon
 
  • Thanks
Reactions: bjs
I started with make install clean, then ports-mgmt/portupgrade, moved to ports-mgmt/portmaster stayed with it and been using it for years now. It pulls in all the dependencies and lists them before you start the build. It makes things easier IMO and if you can make out the fail point in doing it manually you can work out one if it stops. That doesn't happen often though.

I would give that try to see if it didn't result in fewer problems.
I'll give it a try. Trouble is, I keep getting "Stop in....etc." for some of what I need to do with this other computer. Then Firefox refuses to start again.

I ran some tests on the HD and it passed them all. Now I am not sure what to do.
I didn't have this problem when installing FreeBSD (via FuryBSD) on an old Acer laptop which I "did" for our local ham club. It is working just fine.

Oh, well...I'll just keep plugging away at it. I'll eventually figure it out. I am pretty stubborn that way.

BTW, I have three operating systems on this particular computer via three separate HDs. I have Win10 Pro, WinXP-Pro (for some software which won't run in Win10), and FreeBSD.

Ken Gordon
 
Or just use packages: pkg install firefox, done. No compiling, etc. No customization of ports but if you are going for easy, you can't beat packages.
 
Well, I've done just that. Result is that Firefox won't start. In addition, I first did pkg install hplip. During that, Firefox is updated from version 70 to version 72 as part of the package. And THAT results in Firefox refusing to start afterwards.

I am reading the "Absolute FreeBSD" book. It appears I can get around this (above) problem another way as soon as I learn more.

Again, thanks for your help. You are a good fellow. I don't want to use this valuable forum to ask for help with problems I can (eventually) figure out for my self. That wouldn't be right.

Ken Gordon
 
Odd. If you install a single package, another package that is not related should not be upgraded. If you do a pkg upgrade, then it is expected some packages are upgraded. At any point did you install a port via portmaster or just a make install clean?
 
Odd. If you install a single package, another package that is not related should not be upgraded. If you do a pkg upgrade, then it is expected some packages are upgraded. At any point did you install a port via portmaster or just a make install clean?
I've never used portmaster. I have done make install clean for various ports.

Here's the deal: the package for epson-inkjet-printer-escpr does not contain the PPD file for my printer, an Epson XP-830, but the port (being newer?) does. The package for hplip does contain the necessary PPD for my HP Officejet Pro 8610. The port for CUPS seems to have some sort of problem (which I have not yet figured out) interfacing with my system. It flat won't work if I do a make install clean in that port. It acts as though some supporting files or executables are missing.

Therefore, I use the port for epson-inkjet-printer-escpr, and the package for CUPS. When I use the package for hplip, it tries to upgrade firefox, and that is when firefox will no longer start.

If you think I'm confused, you would be correct.

Ken Gordon
 
Try portmaster to upgrade your existing packages through ports. It often fixes missing libraries and other file dependencies. They say not to mix them, but portmaster is made for upgrading and when a package is also not available. Worst case scenario, start all over from packages, and clear the port options.

I use portmaster with the -i option, to tell it not to reinstall llvm, clang or rust, to avoid spending hours compiling. This is if the current versions don't have vulnerabilities: pkg audit -F.
 
I've never used portmaster. I have done make install clean for various ports.

Here's the deal: the package for epson-inkjet-printer-escpr does not contain the PPD file for my printer, an Epson XP-830, but the port (being newer?) does. The package for hplip does contain the necessary PPD for my HP Officejet Pro 8610. The port for CUPS seems to have some sort of problem (which I have not yet figured out) interfacing with my system. It flat won't work if I do a make install clean in that port. It acts as though some supporting files or executables are missing.

Therefore, I use the port for epson-inkjet-printer-escpr, and the package for CUPS. When I use the package for hplip, it tries to upgrade firefox, and that is when firefox will no longer start.

If you think I'm confused, you would be correct.

Ken Gordon

Ken - I don't think you are confused but from what you are saying, you are mixing ports and packages. The problem there is the dependency versions when installing ports are newer than the dependency versions when installing packages. So if installing using both methods, things can break.

You can do as sidetone suggests and use ports-mgmt/portmaster for everything so all versions are consistent with the versions in ports, or start over by removing all packages and just install using packages only. Up to you. Both ways work fine, the real difference is ports are slightly newer and you have the compile time, plus with ports you can customize build options.
 
Note that, by default, packages come from the quarterly branch on -RELEASE versions. The quarterly packages are updated once every 3 months and normally only get security updates in the mean time. You can switch to the latest package repository, which follows the ports tree as close as it can. This means nearly constant updates, each and every day.
 
Back
Top