Return to Level1Techs.com

The small linux problem thread

linux
helpdesk

#1562

I get the same error:

$ . bashrc.sh 
-bash: ./bashrc.sh: line 97: unexpected EOF while looking for matching `)'
-bash: ./bashrc.sh: line 118: syntax error: unexpected end of file

Maybe a new bash release was installed, then reboot caused a the new version run?

Fixed by removing the extra tick on line 93:

alias l='ls -CF''

After changing to this:

alias l='ls -CF'

All is well, error is gone.

$ . bashrc.sh
$ bash --version
GNU bash, version 4.4.23(1)-release (x86_64-redhat-linux-gnu)

#1563

Sorry.

I googled this, though: https://www.hiroom2.com/2018/05/22/fedora-28-lxd-en/

Looks like there is a container-selinux rpm.


#1564

I installed that, but I still get the same errors.

If I try to change the password from the host:

sudo chroot /var/lib/lxc/fedora-c1/rootfs passwd

I get:

Changing password for user root.
New password: 
BAD PASSWORD: The password is shorter than 8 characters
Retype new password: 
passwd: Authentication token manipulation error

#1565

Looks like it works for me. I’ve selinux disabled (I consider selinux a bug, not a feature), so that’s probably the reason it is not working.

$ sudo lxc-create -t fedora -n fedora-c1
Host CPE ID from /etc/os-release: cpe:/o:fedoraproject:fedora:28
Checking cache download in /var/cache/lxc/fedora/x86_64/28/rootfs ... 
Cache found. Updating...
chroot: failed to run command ‘yum’: No such file or directory
Update finished
Copy /var/cache/lxc/fedora/x86_64/28/rootfs to /var/lib/lxc/fedora-c1/rootfs ... 
Copying rootfs to /var/lib/lxc/fedora-c1/rootfs ...
Storing root password in '/var/lib/lxc/fedora-c1/tmp_root_pass'
Expiring password for user root.
passwd: Success
installing fedora-release package
chroot: failed to run command ‘yum’: No such file or directory
sed: can't read /var/lib/lxc/fedora-c1/rootfs/etc/sysconfig/init: No such file or directory

Container rootfs and config have been created.
Edit the config file to check/enable networking setup.

The temporary root password is stored in:

        '/var/lib/lxc/fedora-c1/tmp_root_pass'


The root password is set up as expired and will require it to be changed
at first login, which you should do as soon as possible.  If you lose the
root password or wish to change it without starting the container, you
can change it from the host by running the following command (which will
also reset the expired flag):

        chroot /var/lib/lxc/fedora-c1/rootfs passwd

$ sudo chroot /var/lib/lxc/fedora-c1/rootfs passwd
Changing password for user root.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.

$ sudo lxc-start -F -n fedora-c1
systemd 238 running in system mode. (+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid)
Detected virtualization lxc.
Detected architecture x86-64.

Welcome to Fedora 28 (Twenty Eight)!

Fedora 28 (Twenty Eight)
Kernel 4.17.11-200.fc28.x86_64 on an x86_64 (console)

fedora-c1 login: root
Password: 
[[email protected] ~]# 

I did modify /etc/lxc/default.conf

$ cat /etc/lxc/default.conf 
lxc.network.type = veth
#lxc.network.link = lxcbr0
lxc.network.link = virbr0
lxc.network.flags = up
lxc.network.hwaddr = 00:16:3e:xx:xx:xx

#1566

Disabling selinux was essentially the fix I saw when searching around. I’ll probably have to just do that. I’ll give it shot when I get home from work later today.

I would have thought the selinux policies would have been updated/altered to allow lxc to work after I installed that package, container-selinux. Doesn’t appear to have done anything.


#1567

Nice catch bro!


#1568

I had a bunch of lxc containers running on a fedora server. Worked great and I also had disabled selinux because of multiple reasons . Ran an update one day and lxc containers disappeared. Fought with it about a day and then moved to a Ubuntu server install since they are the ones backing the lxc project.


#1569

Thank you :slight_smile:


#1570

Using LXD you mean. Yeah, I would only use it on Ubuntu. Pretty scary story there.

Ubuntu uses apparmor instead of selinux, which also sucks, but in different and entertaining ways.


#1571

Hello! I would like some help. I am used to install texlive through a package manager and everything was working fine, more or less. Now I am on a new OS environment (latest Manjaro KDE) and I would like to install the version from https://www.tug.org/ with TexStudio. I have tried in the past but TexStudio was complaining of not finding a tex installation.

I have added the texlive paths to my .profile and I can use tex from the terminal. But TexStudio cannot pick up the tex installation. I understand that this is something fundamental and I would like to know how to deal with this situation. I think that my .profile is read by the bash terminal and other applications may look elsewhere (?). I was running the application from the launcher menu.

I have uninstalled and deleted any TexStudio and TexLive config files, then I installed TexLive from https://www.tug.org/, I have added the paths to my .profile and now I am waiting to install TexStudio – I haven’t done this yet though because previously it did not work.

What should I do next? Any ideas? Thanks in advance (and sorry for my English)!


#1572

Securing containers with selinux is non-trivial. It amazes me how after 15 years, selinux still breaks things constantly and mysteriously, nearly every complex problem in this thread is selinux related. At least windows gives you an OK button to click.


#1573

The chances of someone else having the same environment that you are using is slim. TexStudio does run on my Fedora 28 after “dnf install texstudio”.


#1574

Is it a special environment variable, or is it simply path?

You could change /etc/profile, or you could make a wrapper script.

You might find that relogging/rebooting also helps.


#1575

Thank you all for your answers. It is simply these lines added at the /home/username/.profile,

export PATH=/usr/local/texlive/2018/bin/x86_64-linux:$PATH
export MANPATH=/usr/local/texlive/2018/texmf-dist/doc/man:$MANPATH
export INFOPATH=/usr/local/texlive/2018/texmf-dist/doc/info:$INFOPATH

tlmgr runs fine and I was able to update TexLive. I haven’t thought that maybe it is a TexStudio bug and not something TexLive related.


#1576

Have you installed TexLive through your package manager or manually? If I install TexLive with a package manager TexStudio works. I am trying to install it manually from https://www.tug.org. I do not understand what do you mean by someone else having the same environment that I am using. I am on a freshly installed Manjaro KDE.


#1577

With a package manager. I have not read of anyone on these forums that uses Manjaro KDE.


#1578

Have you tried any of the above recommendations?


#1579

I do not have a problem via the package manager.


#1580

I have fixed the issue! I figured that since everything was looking fine in the terminal I should run TexStudio from the terminal too. That made it, it picked up all the appropriate paths by itself so the TexStudio config is created properly. Now when I run it from the launcher menu it is working fine. Probably a noob mistake :slight_smile: Thank you all for your answers.
I talked too soon, it does not compile when I launch it from the launcher menu, but all is well when I launch it from the terminal. That is not a big deal though. But if anyone has any idea why that happens, that would be nice.


#1581

That sounds like a path issue. I would recommend one of the above, or you could modify the desktop file to include the path modification.